CompleteAutoloadTilesInitializer extends AbstractTilesInitializer { @Override protected ApplicationContext createTilesApplicationContext( ApplicationContext preliminaryContext) { return new WildcardServletApplicationContext( (ServletContext) preliminaryContext.getContext()); }    }
@Test public void testCreateTilesApplicationContext() { ApplicationContext preliminaryContext = createMock(ApplicationContext.class); ServletContext servletContext = createMock(ServletContext.class); expect(preliminaryContext.getContext()).andReturn(servletContext); replay(preliminaryContext, servletContext); assertTrue(initializer .createTilesApplicationContext(preliminaryContext) instanceof WildcardServletApplicationContext); verify(preliminaryContext, servletContext); }