ResourceStore r = new ResourceStore(db, "Classes");
r.put(store.getBytecodeMapFromJarInputStream(new FileInputStream(FILE)));
InterceptClassLoader loader = new InterceptClassLoader(getClass().getClassLoader(), Pattern.compile(PATTERN), Arrays.asList(new DatastoreClassLoaderDelegate(r)));
Class c = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClass", true);
//assertTrue(c.newInstance() instanceof Plugin);
// Plugin p = (Plugin) c.newInstance();
// assertEquals("42", p.request());
assertEquals("42", c.getMethod("request").invoke(c.newInstance()));
} catch (Exception e) {