### Question:
ProviderTypeServiceImpl implements ProviderTypeService { @Override public void disableProviderType(final ProviderType providerType) { checkNotNull("providerType", providerType); enableProviderType(providerType, false); } ProviderTypeServiceImpl(); @Inject  ProviderTypeServiceImpl(final RuntimeProvisioningServiceBackend runtimeProvisioningService,
                                   final ProvisioningPreferences provisioningPreferences,
                                   final PreferenceScopeFactory scopeFactory); @Override Collection<ProviderType> getAvailableProviderTypes(); @Override ProviderType getProviderType(final ProviderTypeKey providerTypeKey); @Override Collection<ProviderType> getEnabledProviderTypes(); @Override void enableProviderTypes(final Collection<ProviderType> providerTypes); @Override void disableProviderType(final ProviderType providerType); @Override Map<ProviderType, ProviderTypeStatus> getProviderTypesStatus();  }### Answer:
@Test public void testDisableProviderType() { pickSomeProviders(); pickSomeProviders(); pickedProviderTypes.forEach(providerType -> provisioningPreferences.getProviderTypeEnablements().put(providerType, Boolean.TRUE)); ProviderType providerTypeToDisable = pickedProviderTypes.get(0); service.disableProviderType(providerTypeToDisable); assertFalse(provisioningPreferences.getProviderTypeEnablements().get(providerTypeToDisable)); verify(provisioningPreferences, times(1)).save(preferenceScope); }