### Question:
ClassUtils { public static <T> T loadInstanceOf(Class<T> clazz) { return loadInstanceOf(clazz.getName(), clazz); } private  ClassUtils(); static T loadInstanceOf(Class<T> clazz); static T loadInstanceOf(Class<T> clazz, Class<?>[] constructorTypes, Object[] constructorArgs); static T loadInstanceOf(String implClassName, Class<T> superClass); static T loadInstanceOf(String implClassName,
                                     Class<T> superClass,
                                     Class<?>[] constructorTypes,
                                     Object[] constructorArgs); static boolean classExists(String implClassName); static Field loadField(Class<?> clazz, String fieldName);  }### Answer:
@Test public void testInstantiate() { Set<?> set = ClassUtils.loadInstanceOf(HashSet.class.getName(), Set.class); assertTrue(set instanceof HashSet); }
@Test public void testInstantiateWithArgs() { Number n = ClassUtils.loadInstanceOf(Integer.class.getName(), Number.class, new Class<?>[]{int.class}, new Object[]{3}); assertEquals(3, n.intValue()); }