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

    ClassPathLoader dcl = ClassPathLoader.createWithDefaults(false);

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

      String classToLoad = "java.lang.String";
      assertThatThrownBy(() -> {
        dcl.forName(classToLoad);
      }).isInstanceOf(BrokenError.class);

      String resourceToGet = "java/lang/String.class";
      assertThatThrownBy(() -> {
        dcl.getResource(resourceToGet);
      }).isInstanceOf(BrokenError.class);

      assertThatThrownBy(() -> {
        dcl.getResourceAsStream(resourceToGet);
      }).isInstanceOf(BrokenError.class);
    } finally {
      Thread.currentThread().setContextClassLoader(cl);
    }
  }
Verifies that the {@link BrokenClassLoader} is broken and always throws errors even when used
as a TCCL from {@link ClassPathLoader}. This is primarily a control which ensures that tests
depending on <tt>BrokenClassLoader</tt> are valid, but it also verifies that TCCL is included
by default by <tt>ClassPathLoader</tt>.
geode-core/src/test/java/org/apache/geode/internal/classloader/ClassPathLoaderTest.java