@Test
public void testGetResource() throws IOException {

    URL url = new URL("file:///servletContext/my/path.html");
    URL urlFr = new URL("file:///servletContext/my/path_fr.html");
    expect(servletContext.getResource("/my/path.html")).andReturn(url);
    expect(servletContext.getResource("/my/path_fr.html")).andReturn(urlFr);
    expect(servletContext.getResource("/null/path.html")).andReturn(null);
    replay(servletContext);
    ApplicationResource resource = context.getResource("/my/path.html");
    assertNotNull(resource);
    assertEquals(resource.getLocalePath(), "/my/path.html");
    assertEquals(resource.getPath(), "/my/path.html");
    assertEquals(Locale.ROOT, resource.getLocale());
    ApplicationResource resourceFr = context.getResource(resource, Locale.FRENCH);
    assertNotNull(resourceFr);
    assertEquals("/my/path_fr.html", resourceFr.getLocalePath());
    assertEquals("/my/path.html", resourceFr.getPath());
    assertEquals(Locale.FRENCH, resourceFr.getLocale());
    ApplicationResource nullResource = context.getResource("/null/path.html");
    assertNull(nullResource);
    verify(servletContext);
}