@Test public void shouldBeAbleToConstructDescriptorFromString() throws Exception { final WebAppDescriptor web = Descriptors.importAs(WebAppDescriptor.class) .from(new ByteArrayInputStream(source.getBytes())); Assert.assertNotNull(web); Assert.assertEquals(1, web.getFilters().size()); Assert.assertEquals(1, web.getFilterMappings().size()); }