repositoryAdmin.addRepository(new File("repository.xml").toURI().toURL());
AriesApplicationManager manager = getOsgiService(AriesApplicationManager.class);
AriesApplication app = manager.createApplication(FileSystem.getFSRoot(new File("hello.eba")));
AriesApplicationContext ctx = manager.install(app);
ctx.start();
// Wait 5 seconds just to give the blueprint-managed beans a chance to come up
try {
Thread.sleep(5000);
} catch (InterruptedException ix) {}
HelloWorld hw = getOsgiService(HelloWorld.class);
String result = hw.getMessage();
assertEquals (result, "hello world");
// Uncomment the block below after https://issues.apache.org/jira/browse/FELIX-2546,
// "Only one service is provisioned even when specifying for mulitple services"
// is fixed. This tracks the problem of provisioning only one service even when we
// specify multiple services.
/** HelloWorldManager hwm = getOsgiService(HelloWorldManager.class);
* int numberOfServices = hwm.getNumOfHelloServices();
* assertEquals(2, numberOfServices);
*/
ctx.stop();
manager.uninstall(ctx);
}