### Question:
DefaultCapabilityManager implements ICapabilityManager { @Override public ICapabilityProvider getProvider( String id ) { return providers.get( id ); } protected  DefaultCapabilityManager(); static DefaultCapabilityManager getInstance(); void registerCapabilityProvider( ICapabilityProvider provider ); @Override Set<String> listProviders(); @Override ICapabilityProvider getProvider( String id ); @Override String getId(); @Override Set<String> listCapabilities(); @Override ICapability getCapabilityById( String id ); @Override boolean capabilityExist( String id ); @Override Set<ICapability> getAllCapabilities(); static final String ID; }### Answer:
@Test public void testGetProvider() throws Exception { ICapabilityProvider iCapabilityProvider = mock( ICapabilityProvider.class ); when(iCapabilityProvider.getId()).thenReturn( "test" ); manager.registerCapabilityProvider( iCapabilityProvider ); ICapabilityProvider provider = manager.getProvider( "test" ); assertSame( iCapabilityProvider, provider ); }