@Test
void testDestroy() throws Exception {

    DefaultWebApplication webApp = new DefaultWebApplication();
    webApp.addListener(new TestWebApplicationDestroyListener());
    webApp.initialize();
    webApp.destroy();
    assertNotNull(webApp.getAttribute("contextDestroyed"));
}