@Test public void should_not_fail_clean_file_workSpace() throws Exception { doThrow(ContentAddressableStorageNotFoundException.class).when(workspaceClient) .deleteContainer(any(), anyBoolean()); backupService.backup(inputStream, DataCategory.REPORT, URI); verify(workspaceClient).deleteContainer(any(), anyBoolean()); }
public StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri) throws BackupServiceException { return backup(stream, storageCollectionType, uri, VitamConfiguration.getDefaultStrategy()); }
BackupService { public StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri) throws BackupServiceException { return backup(stream, storageCollectionType, uri, VitamConfiguration.getDefaultStrategy()); } }
BackupService { public StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri) throws BackupServiceException { return backup(stream, storageCollectionType, uri, VitamConfiguration.getDefaultStrategy()); } BackupService(); @VisibleForTesting  BackupService(
        WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory); }
BackupService { public StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri) throws BackupServiceException { return backup(stream, storageCollectionType, uri, VitamConfiguration.getDefaultStrategy()); } BackupService(); @VisibleForTesting  BackupService(
        WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory); StoredInfoResult backupFromWorkspace(String workspaceUri, DataCategory storageCollectionType,
        String objectName); StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri); StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri,
        String strategyId); StoredInfoResult storeIntoOffers(String workspaceContainer, String workspaceUri,
        DataCategory storageCollectionType, String objectName,
        String strategyId); }
BackupService { public StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri) throws BackupServiceException { return backup(stream, storageCollectionType, uri, VitamConfiguration.getDefaultStrategy()); } BackupService(); @VisibleForTesting  BackupService(
        WorkspaceClientFactory workspaceClientFactory,
        StorageClientFactory storageClientFactory); StoredInfoResult backupFromWorkspace(String workspaceUri, DataCategory storageCollectionType,
        String objectName); StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri); StoredInfoResult backup(InputStream stream, DataCategory storageCollectionType, String uri,
        String strategyId); StoredInfoResult storeIntoOffers(String workspaceContainer, String workspaceUri,
        DataCategory storageCollectionType, String objectName,
        String strategyId);  }