@Test
public void testResolve() throws JVoiceXMLEvent, Exception {

    final Application application = new JVoiceXmlApplication(observer);
    VoiceXmlDocument doc1 = new VoiceXmlDocument();
    final Vxml vxml1 = doc1.getVxml();
    final URI testUri1 =
        createUri("scheme", "host", "/path/subpath1", "fragment");
    vxml1.setXmlBase(testUri1);
    application.addDocument(testUri1, doc1);
    final URI testUri2 =
        createUri("scheme", "host", "/path/subpath2", "fragment");
    Assert.assertEquals(testUri2, application.resolve(testUri2));
    final URI testUri3 =
        createUri("scheme", "host", "/path/subpath3", null);
    URI testUri3Relative = new URI("subpath3");
    Assert.assertEquals(testUri3, application.resolve(testUri3Relative));
    final URI testUri4 =
        createUri("scheme", "host", "/path/subpath3/extendedsubpath", null);
    URI testUri4Relative = new URI("subpath3/extendedsubpath");
    Assert.assertEquals(testUri4, application.resolve(testUri4Relative));
    final URI testUri5 =
        createUri("scheme2", "host", "/path/subpath3", null);
    Assert.assertEquals(testUri5, application.resolve(testUri5));
    Assert.assertNull(application.resolve(null));
    application.addDocument(testUri5, null);
}