@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);
    }
@author <a href="mailto:zhanggeng.zg@antfin.com">GengZhang</a>
core/common/src/test/java/com/alipay/sofa/rpc/common/utils/ClassTypeUtilsTest.java