@Test
public void testGetClassAccordingToTCL() {

    // incompatible with JDK 9+
    URLClassLoader current = (URLClassLoader) this.getClass().getClassLoader();
    TempClassLoader t0 = new TempClassLoader(current.getURLs(), null);
    TempClassLoader t1 = new TempClassLoader(current.getURLs(), null);
    ClassLoader old = Thread.currentThread().getContextClassLoader();
    Thread.currentThread().setContextClassLoader(t0);
    Class c0 = ClassTypeUtils.getClass(ClassTypeUtils.class.getCanonicalName());
    Thread.currentThread().setContextClassLoader(t1);
    Class c1 = ClassTypeUtils.getClass(ClassTypeUtils.class.getCanonicalName());
    Thread.currentThread().setContextClassLoader(t0);
    Assert.assertEquals(c0, ReflectCache.getClassCache(ClassTypeUtils.class.getCanonicalName()));
    Thread.currentThread().setContextClassLoader(t1);
    Assert.assertEquals(c1, ReflectCache.getClassCache(ClassTypeUtils.class.getCanonicalName()));
    Thread.currentThread().setContextClassLoader(old);
}