### Question:
ClassLoaderUtils { public static <T> Class<T> loadClass(final String className, final Class<?> callingClass) throws ClassNotFoundException { try { return coerce(Thread.currentThread().getContextClassLoader().loadClass(className)); } catch (final ClassNotFoundException e) { try { return coerce(Class.forName(className)); } catch (final ClassNotFoundException ex) { try { return coerce(ClassLoaderUtils.class.getClassLoader().loadClass(className)); } catch (final ClassNotFoundException exc) { if ((callingClass != null) && (callingClass.getClassLoader() != null)) { return coerce(callingClass.getClassLoader().loadClass(className)); } else { throw exc; } } } } }  static Class<T> loadClass(final String className, final Class<?> callingClass); static URL getResource(final String resourceName, final Class<?> callingClass); static Enumeration<URL> getResources(final String resourceName, final Class<?> callingClass); static InputStream getResourceAsStream(final String resourceName, final Class<?> callingClass); static void printClassLoader(); static void printClassLoader(final ClassLoader cl);  }### Answer:
@Test public void testLoadClass() throws ClassNotFoundException { assertSame(ClassLoaderUtilsTest.class, ClassLoaderUtils.loadClass(ClassLoaderUtilsTest.class.getName(), this.getClass())); try { ClassLoaderUtils.loadClass("some.class", null); fail("Should have thrown a class not found exception"); } catch (ClassNotFoundException ignored) { } }