### Question:
DelegationClassLoader extends ClassLoader { public Class loadClass(String name) throws ClassNotFoundException { return delegateClassLoader.loadClass(name); }  void setDelegateClassLoader(ClassLoader delegateClassLoader); Class loadClass(String name); URL getResource(String name); @Override Enumeration<URL> getResources(String name); InputStream getResourceAsStream(String name); synchronized void setDefaultAssertionStatus(boolean enabled); synchronized void setPackageAssertionStatus(String packageName, boolean enabled); synchronized void setClassAssertionStatus(String className, boolean enabled); synchronized void clearAssertionStatus();  }### Answer:
@Test(expected = ClassNotFoundException.class) public void testCantLoadUnknownClassWithOutDelegateSet() throws ClassNotFoundException { DelegationClassLoader classLoader = new DelegationClassLoader(); classLoader.loadClass("not.a.real.class.path.NotARealClass"); }
@Test public void testLoadSystemClassWithOutDelegateSet() throws ClassNotFoundException { DelegationClassLoader classLoader = new DelegationClassLoader(); Class c = classLoader.loadClass("java.lang.String"); assertNotNull(c); }