/** @throws java.lang.Exception */
  @Before
  public void setUp() throws Exception {
    String symbolicName = getClass().getSimpleName();

    this.bundleContext =
        CamelBlueprintHelper.createBundleContext(
            symbolicName, getBundleFilter(), createTinyBundle());

    // must wait for blueprint container to be published then the namespace
    // parser is complete and we are ready for testing
    LOG.debug("Waiting for BlueprintContainer to be published with symbolicName: {}", symbolicName);
    getOsgiService(
        BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + symbolicName + ")");
  }
 protected <T> T getOsgiService(Class<T> type, long timeout) {
   return CamelBlueprintHelper.getOsgiService(bundleContext, type, timeout);
 }
 /** @throws java.lang.Exception */
 @After
 public void tearDown() throws Exception {
   CamelBlueprintHelper.disposeBundleContext(bundleContext);
   CamelTestSupport.deleteDirectory("target/bundles");
 }
 protected <T> T getOsgiService(Class<T> type, String filter) {
   return CamelBlueprintHelper.getOsgiService(bundleContext, type, filter);
 }