@Test
public void loadClass() throws Exception {

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