ResourceBuilder builderB1 = provisioner.getContentResourceBuilder(identityB1, deployer.getDeployment(RESOURCE_B1));
handles.add(provisioner.installSharedResource(builderB.getResource()));
handles.add(provisioner.installResource(builderB1.getResource()));
try {
// Verify that the modules got installed
Runtime runtime = RuntimeLocator.getRequiredRuntime();
for (ResourceHandle handle : handles) {
ResourceIdentity identity = handle.getResource().getIdentity();
Assert.assertSame(handle.getModule(), runtime.getModule(identity));
Assert.assertEquals("ACTIVE " + identity, State.ACTIVE, handle.getModule().getState());
}
// Verify that the module activator was called
Module moduleB1 = runtime.getModule(identityB1);
MBeanServer server = ServiceLocator.getRequiredService(MBeanServer.class);
Assert.assertTrue("MBean registered", server.isRegistered(getObjectName(moduleB1)));
Assert.assertEquals("ACTIVE", server.getAttribute(getObjectName(moduleB1), "ModuleState"));
} finally {
for (ResourceHandle handle : handles) {