DisableOsgiFramework implements OsgiFramework { @Override public void stop() throws BundleException { throw newException(); } DisableOsgiFramework();  DisableOsgiFramework(RestrictedBundleContext restrictedBundleContext); @Override List<Bundle> installBundle(String bundleLocation); @Override void startBundles(List<Bundle> bundles, boolean privileged); @Override void refreshPackages(); @Override BundleContext bundleContext(); @Override List<Bundle> bundles(); @Override List<Bundle> getBundles(Bundle requestingBundle); @Override void allowDuplicateBundles(Collection<Bundle> bundles); @Override void start(); @Override void stop();  }
@Test(expected = RuntimeException.class) public void require_that_stop_throws_exception() throws BundleException { new DisableOsgiFramework().stop(); }