@Test
public void testVoiceXmlDocument() throws Exception {

    final VoiceXmlDocument doc1 = new VoiceXmlDocument();
    Assert.assertNotNull(doc1.getVxml());
    Assert.assertNull(doc1.getDoctype());
    System.setProperty(VoiceXmlDocument.VXML_VERSION, "2.0");
    final VoiceXmlDocument doc2 = new VoiceXmlDocument();
    Assert.assertNotNull(doc2.getVxml());
    final DocumentType type2 = new VoiceXml20DocumentType();
    Assert.assertEquals(type2.toString(), doc2.getDoctype().toString());
    System.setProperty(VoiceXmlDocument.VXML_VERSION, "2.1");
    final VoiceXmlDocument doc3 = new VoiceXmlDocument();
    Assert.assertNotNull(doc3.getVxml());
    final DocumentType type3 = new VoiceXml21DocumentType();
    Assert.assertEquals(type3.toString(), doc3.getDoctype().toString());
    System.setProperty(VoiceXmlDocument.VXML_VERSION, "2.2");
    IllegalArgumentException error = null;
    try {
        new VoiceXmlDocument();
    } catch (IllegalArgumentException e) {
        error = e;
    }
    Assert.assertNotNull("2.2 is an unsupported version type", error);
    System.setProperty(VoiceXmlDocument.VXML_VERSION, "2.1");
}