ServletApplicationContext implements ApplicationContext { public Collection<ApplicationResource> getResources(String path) { ArrayList<ApplicationResource> resources = new ArrayList<ApplicationResource>(); resources.add(getResource(path)); return resources; } ServletApplicationContext(ServletContext servletContext); Object getContext(); Map<String, Object> getApplicationScope(); Map<String, String> getInitParams(); ApplicationResource getResource(String localePath); ApplicationResource getResource(ApplicationResource base, Locale locale); Collection<ApplicationResource> getResources(String path);  }
@Test public void testGetResources() throws IOException { URL url = new URL("file: expect(servletContext.getResource("/my/path")).andReturn(url); replay(servletContext); Collection<ApplicationResource> resources = context.getResources("/my/path"); assertEquals(1, resources.size()); assertEquals(resources.iterator().next().getLocalePath(), "/my/path"); verify(servletContext); }