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

    // create DCL such that parent cannot find anything
    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(true);

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    try {
      // set the TCCL to never find anything
      Thread.currentThread().setContextClassLoader(new BrokenClassLoader());

      String classToLoad = "java.lang.String";
      Class<?> clazz = dcl.forName(classToLoad);
      assertThat(clazz).isNotNull();

      String resourceToGet = "java/lang/String.class";
      URL url = dcl.getResource(resourceToGet);
      assertThat(url).isNotNull();
      InputStream is = dcl.getResourceAsStream(resourceToGet);
      assertThat(is).isNotNull();
    } finally {
      Thread.currentThread().setContextClassLoader(cl);
    }
  }
Verifies that the class classloader or system classloader will find the class or resource.
Parent is a {@link NullClassLoader} while the TCCL is an excluded {@link BrokenClassLoader}.
geode-core/src/test/java/org/apache/geode/internal/classloader/ClassPathLoaderTest.java