### Question:
Resources implements Resourced { public ResourceDescriptor getResourceDescriptor(final String type, final String name) { for (final ResourceDescriptor resourceDescriptor : resourceDescriptors) { if (resourceDescriptor.getType().equalsIgnoreCase(type) && resourceDescriptor.getName().equalsIgnoreCase(name)) { return resourceDescriptor; } } return null; } Resources(final Iterable<ResourceDescriptor> resourceDescriptors); static Resources fromXml(final Element element); List<ResourceDescriptor> getResourceDescriptors(); @Deprecated List<ResourceDescriptor> getResourceDescriptors(final String type); ResourceLocation getResourceLocation(final String type, final String name); ResourceDescriptor getResourceDescriptor(final String type, final String name); static final Resources EMPTY_RESOURCES; }### Answer:
@Test public void testGetResourceDescriptor() throws DocumentException, PluginParseException { final Resources resources = makeTestResources(); assertNull(resources.getResourceLocation("image", "edit")); assertNull(resources.getResourceLocation("fish", "view")); assertNull(resources.getResourceLocation(null, "view")); assertNull(resources.getResourceLocation("image", null)); assertLocationMatches(resources.getResourceLocation("image", "view"), "image", "view"); }