### Question:
KarafCapabilityProvider extends ServiceTracker<FeaturesService, FeaturesService> implements ICapabilityProvider,
    FeaturesListener { public void watchForInstall( Feature feature, SettableFuture<Boolean> future ) { futures.put( feature.getId(), new InstallFuture( future, INSTALL ) ); } KarafCapabilityProvider( BundleContext bundleContext ); @Override FeaturesService addingService( ServiceReference<FeaturesService> reference ); @Override String getId(); @Override Set<String> listCapabilities(); @Override ICapability getCapabilityById( String id ); @Override boolean capabilityExist( String id ); @Override Set<ICapability> getAllCapabilities(); void watchForInstall( Feature feature, SettableFuture<Boolean> future ); void watchForUnInstall( Feature feature, SettableFuture<Boolean> uninstallFuture ); @Override void featureEvent( FeatureEvent featureEvent ); @Override void repositoryEvent( RepositoryEvent repositoryEvent ); static final String KARAF; }### Answer:
@Test public void testWatchForInstall() throws Exception { Feature feature = mock( Feature.class ); when( feature.getId() ).thenReturn( TEST_FEATURE_ID ); SettableFuture settableFuture = SettableFuture.<Boolean> create(); karafCapabilityProvider = new KarafCapabilityProvider( bundleContext ); karafCapabilityProvider.watchForInstall( feature, settableFuture ); verify( feature ).getId(); }