compositeManifest.put(Constants.IMPORT_PACKAGE, "org.osgi.service.blueprint;version=\"[1.0.0,2.0.0)\", org.osgi.service.blueprint.container;version=1.0");
// this export-package is used by pax junit runner as it needs to see the blueprint sample package
// for the test after the blueprint sample is started.
compositeManifest.put(Constants.EXPORT_PACKAGE, "org.apache.aries.blueprint.sample");
CompositeBundle cb = cbf.installCompositeBundle(frameworkConfig, "test-composite", compositeManifest);
BundleContext compositeBundleContext = cb.getCompositeFramework().getBundleContext();
// install the blueprint sample onto the framework associated with the composite bundle
MavenArtifactProvisionOption mapo = mavenBundleInTest(getClass().getClassLoader(), "org.apache.aries.blueprint", "org.apache.aries.blueprint.sample");
// let's use input stream to avoid invoking mvn url handler which isn't avail in the child framework.
InputStream is = new URL(mapo.getURL()).openStream();
Bundle bundle = compositeBundleContext.installBundle(mapo.getURL(), is);
assertNotNull(bundle);
// start the composite bundle then the blueprint sample
cb.start();
bundle.start();
// start the blueprint bundle and it should detect the previously started blueprint sample
Bundle blueprintBundle = context().getBundleByName("org.apache.aries.blueprint");
blueprintBundle.start();