@Test
  public void testDependencyBetweenJars() throws Exception {
    final File parentJarFile = temporaryFolder.newFile("JarClassLoaderJUnitParent.jar");
    final File usesJarFile = temporaryFolder.newFile("JarClassLoaderJUnitUses.jar");

    // Write out a JAR files.
    StringBuilder StringBuilder = new StringBuilder();
    StringBuilder.append("package jcljunit.parent;");
    StringBuilder.append("public class JarClassLoaderJUnitParent {");
    StringBuilder.append("public String getValueParent() {");
    StringBuilder.append("return \"PARENT\";}}");

    byte[] jarBytes = classBuilder.createJarFromClassContent(
        "jcljunit/parent/JarClassLoaderJUnitParent", StringBuilder.toString());
    writeJarBytesToFile(parentJarFile, jarBytes);
    Deployment parentDeployment = createDeploymentFromJar(parentJarFile);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(parentDeployment);

    StringBuilder = new StringBuilder();
    StringBuilder.append("package jcljunit.uses;");
    StringBuilder.append("public class JarClassLoaderJUnitUses {");
    StringBuilder.append("public String getValueUses() {");
    StringBuilder.append("return \"USES\";}}");

    jarBytes = classBuilder.createJarFromClassContent("jcljunit/uses/JarClassLoaderJUnitUses",
        StringBuilder.toString());
    writeJarBytesToFile(usesJarFile, jarBytes);
    Deployment userDeployment = createDeploymentFromJar(usesJarFile);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(userDeployment);

    StringBuilder = new StringBuilder();
    StringBuilder.append("package jcljunit.function;");
    StringBuilder.append("import jcljunit.parent.JarClassLoaderJUnitParent;");
    StringBuilder.append("import jcljunit.uses.JarClassLoaderJUnitUses;");
    StringBuilder.append("import org.apache.geode.cache.execute.Function;");
    StringBuilder.append("import org.apache.geode.cache.execute.FunctionContext;");
    StringBuilder.append(
        "public class JarClassLoaderJUnitFunction  extends JarClassLoaderJUnitParent implements Function {");
    StringBuilder.append("private JarClassLoaderJUnitUses uses = new JarClassLoaderJUnitUses();");
    StringBuilder.append("public boolean hasResult() {return true;}");
    StringBuilder.append(
        "public void execute(FunctionContext context) {context.getResultSender().lastResult(getValueParent() + \":\" + uses.getValueUses());}");
    StringBuilder.append("public String getId() {return \"JarClassLoaderJUnitFunction\";}");
    StringBuilder.append("public boolean optimizeForWrite() {return false;}");
    StringBuilder.append("public boolean isHA() {return false;}}");

    ClassBuilder functionClassBuilder = new ClassBuilder();
    functionClassBuilder.addToClassPath(parentJarFile.getAbsolutePath());
    functionClassBuilder.addToClassPath(usesJarFile.getAbsolutePath());
    jarBytes = functionClassBuilder.createJarFromClassContent(
        "jcljunit/function/JarClassLoaderJUnitFunction", StringBuilder.toString());
    File jarFunction = temporaryFolder.newFile("JarClassLoaderJUnitFunction.jar");
    writeJarBytesToFile(jarFunction, jarBytes);

    Deployment deployment = createDeploymentFromJar(jarFunction);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(deployment);

    Function function = FunctionService.getFunction("JarClassLoaderJUnitFunction");
    assertThat(function).isNotNull();
    TestResultSender resultSender = new TestResultSender();
    FunctionContext functionContext =
        new FunctionContextImpl(null, function.getId(), null, resultSender);
    function.execute(functionContext);
    assertThat((String) resultSender.getResults()).isEqualTo("PARENT:USES");
  }
Verifies that <tt>getResourceAsStream</tt> works with TCCL from {@link ClassPathLoader}.
geode-core/src/integrationTest/java/org/apache/geode/internal/classloader/ClassPathLoaderIntegrationTest.java