ApplicationContextWrapper implements ApplicationContext { public Collection<ApplicationResource> getResources(String path) { return context.getResources(path); } ApplicationContextWrapper(ApplicationContext context); ApplicationContext getWrappedApplicationContext(); Map<String, Object> getApplicationScope(); Object getContext(); Map<String, String> getInitParams(); ApplicationResource getResource(String localePath); ApplicationResource getResource(ApplicationResource base, Locale locale); Collection<ApplicationResource> getResources(String path);  }
@SuppressWarnings("unchecked") @Test public void testGetResources() throws IOException { ApplicationContext wrappedContext = createMock(ApplicationContext.class); Collection<ApplicationResource> obj = createMock(Collection.class); expect(wrappedContext.getResources("whatever.html")).andReturn(obj); replay(wrappedContext, obj); ApplicationContextWrapper wrapper = new ApplicationContextWrapper(wrappedContext); assertEquals(obj, wrapper.getResources("whatever.html")); verify(wrappedContext, obj); }