@Test
  public void testGetResourceAsStreamExcludeTCCL() throws Exception {
    System.out.println("\nStarting ClassPathLoaderTest#testGetResourceAsStreamExcludeTCCL");

    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);

    String resourceToGet = "com/nowhere/testGetResourceAsStreamExcludeTCCL.rsc";
    assertThat(dcl.getResourceAsStream(resourceToGet)).isNull();

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
      // ensure that TCCL is only CL that can find this resource
      Thread.currentThread().setContextClassLoader(new GeneratingClassLoader());
      assertThat(dcl.getResourceAsStream(resourceToGet)).isNull();
    } finally {
      Thread.currentThread().setContextClassLoader(cl);
    }
  }
Verifies that <tt>getResourceAsStream</tt> will skip TCCL if
<tt>excludeThreadContextClassLoader</tt> has been set to true.
geode-core/src/test/java/org/apache/geode/internal/classloader/ClassPathLoaderTest.java