### Question:
ClassHelper { public static Class<?> forName(String name) throws ClassNotFoundException { return forName(name, getClassLoader()); }  static Class<?> forNameWithThreadContextClassLoader(String name); static Class<?> forNameWithCallerClassLoader(String name, Class<?> caller); static ClassLoader getCallerClassLoader(Class<?> caller); static ClassLoader getClassLoader(Class<?> clazz); static ClassLoader getClassLoader(); static Class<?> forName(String name); static Class<?> forName(String name, ClassLoader classLoader); static Class<?> resolvePrimitiveClassName(String name); static String toShortString(Object obj); static String simpleClassName(Class<?> clazz); static boolean isSetter(Method method); static boolean isGetter(Method method); static boolean isPrimitive(Class<?> type); static Object convertPrimitive(Class<?> type, String value); static boolean isTypeMatch(Class<?> type, String value); static final String ARRAY_SUFFIX; }### Answer:
@Test public void testForName1() throws Exception { assertThat(forName(ClassHelperTest.class.getName()) == ClassHelperTest.class, is(true)); }
@Test public void testForName2() throws Exception { assertThat(forName("byte") == byte.class, is(true)); assertThat(forName("java.lang.String[]") == String[].class, is(true)); assertThat(forName("[Ljava.lang.String;") == String[].class, is(true)); }
@Test public void testForName3() throws Exception { ClassLoader classLoader = Mockito.mock(ClassLoader.class); forName("a.b.c.D", classLoader); verify(classLoader).loadClass("a.b.c.D"); }