@Test public void testGetProvidersInfoProviderTypeNotExisting() { when(providerTypeService.getProviderType(providerTypeKey)).thenReturn(null); ProvidersInfo providersInfo = service.getProvidersInfo(providerTypeKey); assertNull(providersInfo); verify(providerTypeService, times(1)).getProviderType(providerTypeKey); verify(providerService, never()).getProvidersKey(providerType); }
@Override public ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); final ProviderType providerType = providerTypeService.getProviderType(providerTypeKey); if (providerType == null) { return null; } final Collection<ProviderKey> providersKey = providerService.getProvidersKey(providerType); return new ProvidersInfo(providerType, providersKey); }
ProvisioningScreensServiceImpl implements ProvisioningScreensService { @Override public ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); final ProviderType providerType = providerTypeService.getProviderType(providerTypeKey); if (providerType == null) { return null; } final Collection<ProviderKey> providersKey = providerService.getProvidersKey(providerType); return new ProvidersInfo(providerType, providersKey); } }
ProvisioningScreensServiceImpl implements ProvisioningScreensService { @Override public ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); final ProviderType providerType = providerTypeService.getProviderType(providerTypeKey); if (providerType == null) { return null; } final Collection<ProviderKey> providersKey = providerService.getProvidersKey(providerType); return new ProvidersInfo(providerType, providersKey); } ProvisioningScreensServiceImpl(); @Inject  ProvisioningScreensServiceImpl(final ProviderTypeService providerTypeService,
                                          final ProviderService providerService,
                                          final RuntimeService runtimeService); }
ProvisioningScreensServiceImpl implements ProvisioningScreensService { @Override public ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); final ProviderType providerType = providerTypeService.getProviderType(providerTypeKey); if (providerType == null) { return null; } final Collection<ProviderKey> providersKey = providerService.getProvidersKey(providerType); return new ProvidersInfo(providerType, providersKey); } ProvisioningScreensServiceImpl(); @Inject  ProvisioningScreensServiceImpl(final ProviderTypeService providerTypeService,
                                          final ProviderService providerService,
                                          final RuntimeService runtimeService); @Override ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey); @Override RuntimesInfo getRuntimesInfo(final ProviderKey providerKey); @Override boolean hasRuntimes(final ProviderKey providerKey); }
ProvisioningScreensServiceImpl implements ProvisioningScreensService { @Override public ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey) { checkNotNull("providerTypeKey", providerTypeKey); final ProviderType providerType = providerTypeService.getProviderType(providerTypeKey); if (providerType == null) { return null; } final Collection<ProviderKey> providersKey = providerService.getProvidersKey(providerType); return new ProvidersInfo(providerType, providersKey); } ProvisioningScreensServiceImpl(); @Inject  ProvisioningScreensServiceImpl(final ProviderTypeService providerTypeService,
                                          final ProviderService providerService,
                                          final RuntimeService runtimeService); @Override ProvidersInfo getProvidersInfo(final ProviderTypeKey providerTypeKey); @Override RuntimesInfo getRuntimesInfo(final ProviderKey providerKey); @Override boolean hasRuntimes(final ProviderKey providerKey);  }