}
public void testDynamicLoadingFromJarFileWithTwoClasses() {
try {
ResourceStore r = new ResourceStore(db, "Classes");
InterceptClassLoader loader = new InterceptClassLoader(getClass().getClassLoader(), Pattern.compile(PATTERN), Arrays.asList(new DatastoreClassLoaderDelegate(r)));
r.put(store.getBytecodeMapFromJarInputStream(new FileInputStream(FILE2)));
Class c = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClass");
// assertTrue(c.getInterfaces()[0].equals(Plugin.class));
// Plugin p = (Plugin) c.newInstance();
// assertEquals("42", p.request());
assertEquals("42", c.getMethod("request").invoke(c.newInstance()));
Class c2 = loader.loadClass("honeycrm.server.test.small.DynamicallyLoadedClassTwo");
// assertTrue(c2.getInterfaces()[0].equals(Plugin.class));
// Plugin p2 = (Plugin) c2.newInstance();
// assertEquals("23", p2.request());
assertEquals("23", c2.getMethod("request").invoke(c2.newInstance()));
} catch (Exception e) {