@Test
void testOnStartup() throws Exception {

    DefaultWebApplication webApplication = new DefaultWebApplication();
    webApplication.addResource(new DirectoryResource(new File("src/test/webxml/init")));
    webApplication.addInitializer(new WebXmlInitializer());
    webApplication.initialize();
    ServletRegistration registration = webApplication.getServletRegistration("Test Servlet");
    assertNotNull(registration);
    assertFalse(registration.getMappings().isEmpty());
    assertEquals("*.html", registration.getMappings().iterator().next());
    assertEquals("application/x-java-class", webApplication.getMimeType("my.class"));
    assertEquals("myvalue", webApplication.getInitParameter("myname"));
    assertEquals("myservletcontext", webApplication.getServletContextName());
}