ClassPathLoader { public URL getResource(final String name) { final boolean isTraceEnabled = logger.isTraceEnabled(); if (isTraceEnabled) { logger.trace("getResource({})", name); } for (ClassLoader classLoader : getClassLoaders()) { if (isTraceEnabled) { logger.trace("getResource trying: {}", classLoader); } try { URL url = classLoader.getResource(name); if (url != null) { if (isTraceEnabled) { logger.trace("getResource found by: {}", classLoader); } return url; } } catch (SecurityException e) { } } return null; } ClassPathLoader(boolean excludeTCCL);  ClassPathLoader(boolean excludeTCCL, File workingDir); static ClassPathLoader setLatestToDefault(File workingDir); JarDeployer getJarDeployer(); URL getResource(final String name); Class<?> forName(final String name); @Override String toString(); URL getResource(final Class<?> contextClass, final String name); InputStream getResourceAsStream(final String name); InputStream getResourceAsStream(final Class<?> contextClass, final String name); Enumeration<URL> getResources(final String name); ClassLoader asClassLoader(); static ClassPathLoader getLatest(); static ClassLoader getLatestAsClassLoader();  }
@Test public void testGetResource() throws Exception { System.out.println("\nStarting ClassPathLoaderTest#testGetResource"); String resourceToGet = "org/apache/geode/internal/classpathloaderjunittest/DoesExist.class"; URL url = ClassPathLoader.getLatest().getResource(resourceToGet); assertThat(url).isNotNull(); InputStream is = url != null ? url.openStream() : null; assertThat(is).isNotNull(); int totalBytesRead = 0; byte[] input = new byte[256]; BufferedInputStream bis = new BufferedInputStream(is); for (int bytesRead = bis.read(input); bytesRead > -1;) { totalBytesRead += bytesRead; bytesRead = bis.read(input); } bis.close(); assertThat(totalBytesRead).isEqualTo(GENERATED_CLASS_BYTES_COUNT); }