@Test
public void whichClass() throws Exception {

    // load from context loader
    assertNull(ClassLoaderUtil.whichClass(null));
    assertNull(ClassLoaderUtil.whichClass("aaa.NotExistClass"));
    assertNotNull(ClassLoaderUtil.whichClass("java.lang.String"));
    // load from class referrer
    assertNull(ClassLoaderUtil.whichClass(null, getClass()));
    assertNull(ClassLoaderUtil.whichClass(null, (Class<?>) null));
    assertNull(ClassLoaderUtil.whichClass("aaa.NotExistClass", getClass()));
    assertNull(ClassLoaderUtil.whichClass("aaa.NotExistClass", (Class<?>) null));
    assertNotNull(ClassLoaderUtil.whichClass("java.lang.String", getClass()));
    assertNotNull(ClassLoaderUtil.whichClass("java.lang.String", (Class<?>) null));
    // load from specified loader
    assertNull(ClassLoaderUtil.whichClass(null, getClass().getClassLoader()));
    assertNull(ClassLoaderUtil.whichClass(null, (ClassLoader) null));
    assertNull(ClassLoaderUtil.whichClass("aaa.NotExistClass", getClass().getClassLoader()));
    assertNull(ClassLoaderUtil.whichClass("aaa.NotExistClass", (ClassLoader) null));
    assertNotNull(ClassLoaderUtil.whichClass("java.lang.String", getClass().getClassLoader()));
    assertNotNull(ClassLoaderUtil.whichClass("java.lang.String", (ClassLoader) null));
}