@Test
  public void testBundleDeployment() throws Exception {

    InputStream input = provider.getClientDeploymentAsStream("test-bundle-one");
    Bundle bundle = context.installBundle("test-bundle", input);
    try {
      // Assert that the bundle is in state INSTALLED
      OSGiTestHelper.assertBundleState(Bundle.INSTALLED, bundle.getState());

      // Start the bundle
      bundle.start();
      OSGiTestHelper.assertBundleState(Bundle.ACTIVE, bundle.getState());

      // Stop the bundle
      bundle.stop();
      OSGiTestHelper.assertBundleState(Bundle.RESOLVED, bundle.getState());
    } finally {
      bundle.uninstall();
      OSGiTestHelper.assertBundleState(Bundle.UNINSTALLED, bundle.getState());
    }
  }