### Question:
ClassPathUtils { public static Class<?> safeClassForName(ClassLoader classLoader, String className) { try { if (className.startsWith("com.sun.") || className.startsWith("com.apple.")) { return null; } else { return Class.forName(className, true, classLoader); } } catch (ClassNotFoundException e) { return null; } catch (NoClassDefFoundError e) { return null; } } private  ClassPathUtils(); static Set<Class<?>> scanPackage(ClassLoader classLoader, Package pkg); static Set<Class<?>> scanPackage(ClassLoader classLoader, String pkg); static Class<?> safeClassForName(ClassLoader classLoader, String className);  }### Answer:
@Test public void safeClassForName() { assertNull(safeForName("com.sun.nio.file.ExtendedOpenOption")); assertNotNull(safeForName("com.suntanning.ShouldBeLoaded")); assertNotNull(safeForName("com.applejuice.ShouldBeLoaded")); }