}
@Test
public void testAddonsLoadAPIClassesFromBootpathJAR() throws IOException, Exception
{
Furnace furnace = FurnaceFactory.getInstance();
furnace.addRepository(AddonRepositoryMode.MUTABLE, repodir1);
AddonDependencyResolver resolver = new MavenAddonDependencyResolver();
AddonManager manager = new AddonManagerImpl(furnace, resolver);
AddonId no_dep = AddonId.from("test:no_dep", "1.0.0.Final");
AddonId one_dep = AddonId.from("test:one_dep", "1.0.0.Final");
manager.install(no_dep).perform();
manager.install(one_dep).perform();
ConfigurationScanListener listener = new ConfigurationScanListener();
ListenerRegistration<ContainerLifecycleListener> registration = furnace.addContainerLifecycleListener(listener);
furnace.startAsync();
while (!listener.isConfigurationScanned())
Thread.sleep(100);
registration.removeListener();
Addon projectsAddon = furnace.getAddonRegistry().getAddon(no_dep);
Addons.waitUntilStarted(projectsAddon, 10, TimeUnit.SECONDS);
ClassLoader addonClassLoader = projectsAddon.getClassLoader().loadClass(Addon.class.getName()).getClassLoader();
ClassLoader appClassLoader = Addon.class.getClassLoader();
Assert.assertNotEquals(appClassLoader, addonClassLoader);
Assert.assertTrue(projectsAddon.getStatus().isStarted());
furnace.stop();
}