@Test
public void testInitialize() throws MalformedURLException {

    ApplicationContext preliminaryContext = createMock(ApplicationContext.class);
    ServletContext servletContext = createMock(ServletContext.class);
    URL manifestUrl = getClass().getResource("/FAKE-MANIFEST.MF");
    expect(preliminaryContext.getContext()).andReturn(servletContext);
    expect(servletContext.getResource("/META-INF/MANIFEST.MF")).andReturn(manifestUrl);
    replay(preliminaryContext, servletContext);
    ModularTilesInitializer initializer = new ModularTilesInitializer();
    initializer.initialize(preliminaryContext);
    assertTrue(TilesInitializer1.initialized);
    assertTrue(TilesInitializer2.initialized);
    initializer.destroy();
    assertTrue(TilesInitializer1.destroyed);
    assertTrue(TilesInitializer2.destroyed);
    verify(preliminaryContext, servletContext);
}