TypesFromReflection { public static Class<?> loadClass(NullableClassLoader ctr, String className) { return loadClassMaybeArray(ctr, StringUtils.deleteWhitespace(className)); } private  TypesFromReflection(); static Class<?> loadClass(NullableClassLoader ctr, String className);  }
@Test public void testNestedClass() { Class<?> c = TypesFromReflection.loadClass(LOADER, "java.util.Map.Entry"); Assert.assertEquals(Map.Entry.class, c); }
@Test public void testPrimitiveArray() { Class<?> c = TypesFromReflection.loadClass(LOADER, "int[ ]"); Assert.assertEquals(int[].class, c); }
@Test public void testNestedClassArray() { Class<?> c = TypesFromReflection.loadClass(LOADER, "java.util.Map.Entry[ ]"); Assert.assertEquals(Map.Entry[].class, c); }
@Test public void testInvalidName() { expect.expect(IllegalArgumentException.class); TypesFromReflection.loadClass(LOADER, "java.util.Map ]"); }
@Test public void testInvalidName2() { expect.expect(IllegalArgumentException.class); TypesFromReflection.loadClass(LOADER, "[]"); }
@Test public void testNullName() { expect.expect(NullPointerException.class); TypesFromReflection.loadClass(LOADER, null); }