@RunWithCustomExecutor @Test public void should_get_empty_listing_when_listing_units_and_storage_returns_empty_response_ok() throws StorageServerClientException { when(storageClientFactory.getClient().getOfferLogs(STRATEGY_UNIT, DataCategory.UNIT, 100L, 2, Order.ASC)) .thenReturn(getListingOk(100L, -1L)); RestoreBackupService restoreBackupService = new RestoreBackupService(storageClientFactory); Iterator<OfferLog> res = restoreBackupService.getListing(STRATEGY_UNIT, DataCategory.UNIT, 100L, 2, Order.ASC, VitamConfiguration.getRestoreBulkSize()); assertThat(res).isNotNull().isEmpty(); }
public Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order, int batchSize) { LOGGER.info(String.format( "[Reconstruction]: Retrieve listing of {%s} Collection on {%s} Vitam strategy from {%s} offset with {%s} limit", category, strategy, offset, limit)); return OfferLogHelper.getListing( storageClientFactory, strategy, category, offset, order, batchSize, limit); }
RestoreBackupService { public Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order, int batchSize) { LOGGER.info(String.format( "[Reconstruction]: Retrieve listing of {%s} Collection on {%s} Vitam strategy from {%s} offset with {%s} limit", category, strategy, offset, limit)); return OfferLogHelper.getListing( storageClientFactory, strategy, category, offset, order, batchSize, limit); } }
RestoreBackupService { public Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order, int batchSize) { LOGGER.info(String.format( "[Reconstruction]: Retrieve listing of {%s} Collection on {%s} Vitam strategy from {%s} offset with {%s} limit", category, strategy, offset, limit)); return OfferLogHelper.getListing( storageClientFactory, strategy, category, offset, order, batchSize, limit); } RestoreBackupService(); @VisibleForTesting  RestoreBackupService(StorageClientFactory storageClientFactory); }
RestoreBackupService { public Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order, int batchSize) { LOGGER.info(String.format( "[Reconstruction]: Retrieve listing of {%s} Collection on {%s} Vitam strategy from {%s} offset with {%s} limit", category, strategy, offset, limit)); return OfferLogHelper.getListing( storageClientFactory, strategy, category, offset, order, batchSize, limit); } RestoreBackupService(); @VisibleForTesting  RestoreBackupService(StorageClientFactory storageClientFactory); Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order,
        int batchSize); MetadataBackupModel loadData(String strategy, MetadataCollections collection, String filename,
        long offset); InputStream loadData(String strategy, DataCategory category, String filename); }
RestoreBackupService { public Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order, int batchSize) { LOGGER.info(String.format( "[Reconstruction]: Retrieve listing of {%s} Collection on {%s} Vitam strategy from {%s} offset with {%s} limit", category, strategy, offset, limit)); return OfferLogHelper.getListing( storageClientFactory, strategy, category, offset, order, batchSize, limit); } RestoreBackupService(); @VisibleForTesting  RestoreBackupService(StorageClientFactory storageClientFactory); Iterator<OfferLog> getListing(String strategy, DataCategory category, Long offset, Integer limit, Order order,
        int batchSize); MetadataBackupModel loadData(String strategy, MetadataCollections collection, String filename,
        long offset); InputStream loadData(String strategy, DataCategory category, String filename);  }