### Question:
TemporaryClassLoader extends ClassLoader { public TemporaryClassLoader(ClassLoader parent) { super(parent); } TemporaryClassLoader(ClassLoader parent); @Override Class loadClass(String name);  }### Answer:
@Test public void testTemporaryClassLoader() throws Exception { Set s = new HashSet(); for (int i = 0; i < 2; i++) { ClassLoader loader = new TemporaryClassLoader (getClass().getClassLoader()); Class cls = Class.forName("org.apache.openjpa.lib.util.TempClass", true, loader); s.add(cls); assertEquals(loader, cls.getClassLoader()); assertEquals(i + 1, s.size()); } }