### Question:
ClassUtils { @SuppressWarnings("unchecked") public static <T> Class<T> getExistingClass(ClassLoader classLoader, String className) { try { return (Class<T>) Class.forName(className, true, classLoader); } catch (ClassNotFoundException e) { return null; } } private  ClassUtils(); static String classNameToInternalClassName(String className); static String classNameToResource(String className); @SuppressWarnings("unchecked") static Class<T> getExistingClass(ClassLoader classLoader, String className); @SuppressWarnings("deprecation") static T newInstance(Class<T> clazz);  }### Answer:
@Test public void testGetExistingClass_existing() { Class<?> actual = ClassUtils.getExistingClass(getClass().getClassLoader(), getClass().getName()); assertSame(actual, getClass()); }
@Test public void testGetExistingClass_notExisting() { Class<?> actual = ClassUtils.getExistingClass(getClass().getClassLoader(), getClass().getName() + "$$$1"); assertNull(actual); }