### Question:
ReloadingClassLoader extends ClassLoader { @Override public Class loadClass(String name) throws ClassNotFoundException { try { JavaFile javaFile; JavaClass javaClass = classCache.get(name); if (javaClass == null) { Optional<NotYetLoadedJavaFile> javaFileWithSource = NotYetLoadedJavaFile.create(name, generationRoots); if (javaFileWithSource.isPresent()) { javaFile = javaFileWithSource.get(); } else { javaFile = new JavaFileOnClasspath(getParent().loadClass(name)); } if (isJavaCoreClass(name)) { javaClass = new JavaClass(javaFile.getJavaClass()); } else { Class<?> originalClass = (javaFile instanceof NotYetLoadedJavaFile) ? getParent().loadClass(name) : javaFile.getJavaClass(); if (reloadPredicate.apply(originalClass, javaFile instanceof NotYetLoadedJavaFile)) { byte[] classData = javaFile.readClass(); AddAnnotationClassChangeVisitor addAnnotationClassChangeVisitor = new AddAnnotationClassChangeVisitor(originalClass, annotationDescriptions); byte[] classDataWithAnnotations = addAnnotationClassChangeVisitor.apply(classData); javaClass = new JavaClass(defineClass(name, classDataWithAnnotations, 0, classDataWithAnnotations.length), classDataWithAnnotations); } else { javaClass = new JavaClass(originalClass); } } classCache.put(name, javaClass); } return javaClass.getJavaClass(); } catch (ClassNotFoundException | IOException | ClassFormatError ex) { throw new ClassNotFoundException("Error while reloading the class '" + name + "'.", ex); } } ReloadingClassLoader(GenerationRoots generationRoots, ClassLoader parent, 
            List<AnnotationDescription> annotationDescriptions, Optional<? extends ReloadPredicate> reloadPredicate); @Override Class loadClass(String name); Optional<byte[]> getByteCode(String javaClassName);  }### Answer:
@Test public void testReloading() throws ClassNotFoundException { Class originalTestWebPageClass = getCurrentClassLoader().loadClass(TestWebPage.class.getName()); ReloadingClassLoader reloadingClassLoader = new ReloadingClassLoader(getTestGenerationRoots(), getCurrentClassLoader(), new ArrayList(), Optional.<ReloadPredicate>absent()); Class newTestWebPageClass = reloadingClassLoader.loadClass(TestWebPage.class.getName()); assertFalse(originalTestWebPageClass.equals(newTestWebPageClass)); assertTrue(originalTestWebPageClass.getName().equals(newTestWebPageClass.getName())); }