### Question:
JarUtilities { public static Collection<? extends URL> listFiles(ClassLoader classLoader, String path, int depth) { Collection<URL> results = new ArrayList<>(); Enumeration<URL> resources; try { resources = classLoader.getResources(path); while (resources.hasMoreElements()) { URL url = resources.nextElement(); File file = new File(url.getFile()); if (file.isFile() || depth == 0) { results.add(url); } else if (file.isDirectory()) { getFilesInDirectory(path, file, depth - 1, results); } else { getFilesInJar(path, url, depth, results); } } } catch (IOException e) { LOGGER.warn("Failed to load resources: " + e, e); } return results; } private  JarUtilities(); static Collection<? extends URL> listFiles(ClassLoader classLoader, String path, int depth);  }### Answer:
@Test public void testListFiles() throws IOException { Collection<? extends URL> files = JarUtilities.listFiles(JarUtilitiesTest.class.getClassLoader(), "io/opensphere/core/util/lang", 1); Assert.assertFalse(files.isEmpty()); for (URL url : files) { if (url.getFile().contains(JarUtilitiesTest.class.getSimpleName())) { Assert.assertEquals("application/java-vm", url.openConnection().getContentType()); return; } } Assert.fail("Did not find JarUtilitiesTest class."); }