@Test
  public void testUpdateClassInJar() throws Exception {
    // First use of the JAR file
    byte[] jarBytes = classBuilder.createJarFromClassContent("JarClassLoaderJUnitTestClass",
        "public class JarClassLoaderJUnitTestClass { public Integer getValue5() { return new Integer(5); } }");
    File jarFile = temporaryFolder.newFile("JarClassLoaderJUnitUpdate.jar");
    writeJarBytesToFile(jarFile, jarBytes);
    Deployment deployment = createDeploymentFromJar(jarFile);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(deployment);

    Class<?> clazz = ClassPathLoader.getLatest().forName("JarClassLoaderJUnitTestClass");
    Object object = clazz.newInstance();
    Method getValue5Method = clazz.getMethod("getValue5");
    Integer value = (Integer) getValue5Method.invoke(object);
    assertThat(value).isEqualTo(5);

    // Now create an updated JAR file and make sure that the method from the new
    // class is available.
    jarBytes = classBuilder.createJarFromClassContent("JarClassLoaderJUnitTestClass",
        "public class JarClassLoaderJUnitTestClass { public Integer getValue10() { return new Integer(10); } }");
    File jarFile2 = new File(temporaryFolder.getRoot(), "JarClassLoaderJUnitUpdate.jar");
    writeJarBytesToFile(jarFile2, jarBytes);
    Deployment deployment2 = createDeploymentFromJar(jarFile2);
    ClassPathLoader.getLatest().getJarDeploymentService().deploy(deployment2);

    clazz = ClassPathLoader.getLatest().forName("JarClassLoaderJUnitTestClass");
    object = clazz.newInstance();
    Method getValue10Method = clazz.getMethod("getValue10");
    value = (Integer) getValue10Method.invoke(object);
    assertThat(value).isEqualTo(10);
  }
Verifies that <tt>getResourceAsStream</tt> works with TCCL from {@link ClassPathLoader}.
geode-core/src/integrationTest/java/org/apache/geode/internal/classloader/ClassPathLoaderIntegrationTest.java