@Test public void testGetProviderTypeNotExisting() { ProviderTypeKey providerTypeKey = new ProviderTypeKey("NonExisting", "NonExisting"); ProviderType providerType = service.getProviderType(providerTypeKey); assertNull(providerType); }
@Override public ProviderType getProviderType(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); return getAvailableProviderTypes().stream() .filter(providerType -> providerType.getKey().equals(providerTypeKey)) .findFirst().orElse(null); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public ProviderType getProviderType(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); return getAvailableProviderTypes().stream() .filter(providerType -> providerType.getKey().equals(providerTypeKey)) .findFirst().orElse(null); } }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public ProviderType getProviderType(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); return getAvailableProviderTypes().stream() .filter(providerType -> providerType.getKey().equals(providerTypeKey)) .findFirst().orElse(null); } ProviderTypeServiceImpl(); @Inject  ProviderTypeServiceImpl(final RuntimeProvisioningServiceBackend runtimeProvisioningService,
                                   final ProvisioningPreferences provisioningPreferences,
                                   final PreferenceScopeFactory scopeFactory); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public ProviderType getProviderType(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); return getAvailableProviderTypes().stream() .filter(providerType -> providerType.getKey().equals(providerTypeKey)) .findFirst().orElse(null); } 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(); }
ProviderTypeServiceImpl implements ProviderTypeService { @Override public ProviderType getProviderType(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); return getAvailableProviderTypes().stream() .filter(providerType -> providerType.getKey().equals(providerTypeKey)) .findFirst().orElse(null); } 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();  }