### Question:
Activator implements BundleActivator { public void start( BundleContext bundleContext ) { this.urlTransformer = new UrlTransformer(); this.urlTransformerRegistration = bundleContext.registerService( ArtifactUrlTransformer.class, this.urlTransformer, null ); this.urlHandler = new UrlHandler(); Dictionary<String, String> props = new Hashtable<>(); props.put( URLConstants.URL_HANDLER_PROTOCOL, WebPackageURLConnection.URL_PROTOCOL ); this.urlHandlerRegistration = bundleContext.registerService( URLStreamHandlerService.class, this.urlHandler, props ); }  void start( BundleContext bundleContext ); void stop( BundleContext bundleContext );  }### Answer:
@Test public void start() throws Exception { BundleContext mockBundleContext = mock( BundleContext.class ); this.activator.start( mockBundleContext ); verify( mockBundleContext, times( 1 ) ).registerService( eq( ArtifactUrlTransformer.class ), any( ArtifactUrlTransformer.class ), any() ); verify( mockBundleContext, times( 1 ) ).registerService( eq( URLStreamHandlerService.class ), any( URLStreamHandlerService.class ), any() ); }