### Question:
ClassLoaderResourceLocator implements ResourceLocator { @Override public Collection<Resource> findResources(String name) { Collection<Resource> resources = new ArrayList<>(3); Enumeration<URL> urls; try { urls = classLoaderManager.getClassLoader(name).getResources(name); } catch (IOException e) { throw new ConfigurationException("Error getting resources for "); } while (urls.hasMoreElements()) { resources.add(new URLResource(urls.nextElement())); } return resources; } ClassLoaderResourceLocator(@Inject ClassLoaderManager classLoaderManager); @Override Collection<Resource> findResources(String name);  }### Answer:
@Test public void testFindResources() { ClassLoaderResourceLocator locator = new ClassLoaderResourceLocator(new DefaultClassLoaderManager()); Collection<Resource> resources = locator .findResources("org/apache/cayenne/resource/ClassLoaderResourceLocatorTest.class"); assertNotNull(resources); assertEquals(1, resources.size()); Resource resource = resources.iterator().next(); assertNotNull(resource); assertNotNull(resource.getURL()); assertTrue(resource.getURL().toExternalForm() .endsWith("org/apache/cayenne/resource/ClassLoaderResourceLocatorTest.class")); }