@Test public void testGetProviderTypes() { List<ProviderType> values = mockList(ProviderType.class, ELEMENTS_COUNT); ProviderTypeList list = new ProviderTypeList(values); when(runtimeProvisioningService.getProviderTypes(PAGE, PAGE_SIZE, SORT, SORT_ORDER)).thenReturn(list); List<ProviderType> result = runtimeProvisioningServiceBackend.getProviderTypes(PAGE, PAGE_SIZE, SORT, SORT_ORDER); verify(runtimeProvisioningService, times(1)).getProviderTypes(PAGE, PAGE_SIZE, SORT, SORT_ORDER); assertEquals(values, result); }
@Override public List<ProviderType> getProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return runtimeProvisioningService.getProviderTypes(page, pageSize, sort, sortOrder).getItems(); }
RuntimeProvisioningServiceBackendImpl implements RuntimeProvisioningServiceBackend { @Override public List<ProviderType> getProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return runtimeProvisioningService.getProviderTypes(page, pageSize, sort, sortOrder).getItems(); } }
RuntimeProvisioningServiceBackendImpl implements RuntimeProvisioningServiceBackend { @Override public List<ProviderType> getProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return runtimeProvisioningService.getProviderTypes(page, pageSize, sort, sortOrder).getItems(); } RuntimeProvisioningServiceBackendImpl(); @Inject  RuntimeProvisioningServiceBackendImpl(final RuntimeProvisioningService runtimeProvisioningService); }
RuntimeProvisioningServiceBackendImpl implements RuntimeProvisioningServiceBackend { @Override public List<ProviderType> getProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return runtimeProvisioningService.getProviderTypes(page, pageSize, sort, sortOrder).getItems(); } RuntimeProvisioningServiceBackendImpl(); @Inject  RuntimeProvisioningServiceBackendImpl(final RuntimeProvisioningService runtimeProvisioningService); @Override List<ProviderType> getProviderTypes(Integer page,
                                               Integer pageSize,
                                               String sort,
                                               boolean sortOrder); @Override List<Provider> getProviders(Integer page,
                                       Integer pageSize,
                                       String sort,
                                       boolean sortOrder); @Override List<Runtime> getRuntimes(Integer page,
                                     Integer pageSize,
                                     String sort,
                                     boolean sortOrder); @Override void registerProvider(ProviderConfig conf); @Override void unregisterProvider(String name); @Override String newRuntime(RuntimeConfig conf); @Override void destroyRuntime(String runtimeId,
                               boolean forced); @Override void startRuntime(String runtimeId); @Override void stopRuntime(String runtimeId); @Override void restartRuntime(String runtimeId); @Override List<RuntimeQueryResultItem> executeQuery(RuntimeQuery query); }
RuntimeProvisioningServiceBackendImpl implements RuntimeProvisioningServiceBackend { @Override public List<ProviderType> getProviderTypes(Integer page, Integer pageSize, String sort, boolean sortOrder) throws BusinessException { return runtimeProvisioningService.getProviderTypes(page, pageSize, sort, sortOrder).getItems(); } RuntimeProvisioningServiceBackendImpl(); @Inject  RuntimeProvisioningServiceBackendImpl(final RuntimeProvisioningService runtimeProvisioningService); @Override List<ProviderType> getProviderTypes(Integer page,
                                               Integer pageSize,
                                               String sort,
                                               boolean sortOrder); @Override List<Provider> getProviders(Integer page,
                                       Integer pageSize,
                                       String sort,
                                       boolean sortOrder); @Override List<Runtime> getRuntimes(Integer page,
                                     Integer pageSize,
                                     String sort,
                                     boolean sortOrder); @Override void registerProvider(ProviderConfig conf); @Override void unregisterProvider(String name); @Override String newRuntime(RuntimeConfig conf); @Override void destroyRuntime(String runtimeId,
                               boolean forced); @Override void startRuntime(String runtimeId); @Override void stopRuntime(String runtimeId); @Override void restartRuntime(String runtimeId); @Override List<RuntimeQueryResultItem> executeQuery(RuntimeQuery query);  }