ClassUtil { public static Object instantiate(String className) { return instantiate(className, false); } private  ClassUtil(); static Class<? extends T> getClass(String className,
            Class<T> baseClass); static Object instantiate(String className); static Object instantiate(String className, boolean returnNull); static void collectBeanInfo(Class<?> clazz,
            Map<String, PropertyDescriptor> name2descriptor);  }
@Test public void testInstantiate() { assertNotNull(ClassUtil.instantiate(TestClass.class.getName(), true)); assertNull(ClassUtil.instantiate("this.class.does.not.Exist", true)); }
@Test public void testInstantiateOneParameter() { assertNotNull(ClassUtil.instantiate(TestClass.class.getName())); }
@Test(expected = CannotInstantiateObjectException.class) public void testInstantiateOneParameterException() { assertNotNull(ClassUtil.instantiate("this.class.does.not.Exist")); }
@Test(expected = CannotInstantiateObjectException.class) public void testInstantiateInstantiationException() { ClassUtil.instantiate(TestInterface.class.getName()); }
@Test(expected = CannotInstantiateObjectException.class) public void testInstantiateIllegalAccessException() { ClassUtil.instantiate(TestPrivateClass.class.getName()); }