expect(portletContext.getResource("/my/path.html")).andReturn(url);
expect(portletContext.getResource("/my/path_fr.html")).andReturn(urlFr);
expect(portletContext.getResource("/null/path.html")).andReturn(null);
replay(portletContext);
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(portletContext);
}