@Test
  public void testFindResource() throws IOException, ClassNotFoundException {
    final String fileName = "file.txt";
    final String fileContent = "FILE CONTENT";

    byte[] jarBytes = classBuilder.createJarFromFileContent(fileName, fileContent);
    File tempJar = temporaryFolder.newFile("JarClassLoaderJUnitResource.jar");
    writeJarBytesToFile(tempJar, jarBytes);
    Deployment deployment = createDeploymentFromJar(tempJar);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(deployment);

    InputStream inputStream = ClassPathLoader.getLatest().getResourceAsStream(fileName);
    assertThat(inputStream).isNotNull();

    final byte[] fileBytes = new byte[fileContent.length()];
    inputStream.read(fileBytes);
    inputStream.close();
    assertThat(fileContent).isEqualTo(new String(fileBytes));
  }
Verifies that <tt>getResourceAsStream</tt> works with TCCL from {@link ClassPathLoader}.
geode-core/src/integrationTest/java/org/apache/geode/internal/classloader/ClassPathLoaderIntegrationTest.java