pluginMechanism.destroy();
}
@Test
public void testLoadConnectorTypes() throws Exception {
JpfPluginMechanism pluginMechanism = new JpfPluginMechanism(PLUGINS_PATH);
pluginMechanism.configure();
// check that we can load the class
Class<?> receiverClass = (Class<?>) pluginMechanism.loadClass("org.mokai.connector.TestConnector");
Assert.assertNotNull(receiverClass);
// check that we find the receiver class in the test plugin
Set<Class<? extends Connector>> receiverTypes = pluginMechanism.loadTypes(Connector.class);
Assert.assertEquals(1, receiverTypes.size());
Assert.assertEquals(receiverClass, receiverTypes.iterator().next());
pluginMechanism.destroy();
}