@Test public void shouldRetrieveArtifact() throws Exception { Resource expectedResource = mock(Resource.class); when(artifactRepository.find("fileStoreId",TENANTID)).thenReturn(expectedResource); Resource actualResource = storageService.retrieve("fileStoreId",TENANTID); assertEquals(expectedResource, actualResource); }
public Resource retrieve(String fileStoreId, String tenantId) throws IOException { return artifactRepository.find(fileStoreId, tenantId); }
StorageService { public Resource retrieve(String fileStoreId, String tenantId) throws IOException { return artifactRepository.find(fileStoreId, tenantId); } }
StorageService { public Resource retrieve(String fileStoreId, String tenantId) throws IOException { return artifactRepository.find(fileStoreId, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); }
StorageService { public Resource retrieve(String fileStoreId, String tenantId) throws IOException { return artifactRepository.find(fileStoreId, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds); }
StorageService { public Resource retrieve(String fileStoreId, String tenantId) throws IOException { return artifactRepository.find(fileStoreId, tenantId); } @Autowired  StorageService(ArtifactRepository artifactRepository, IdGeneratorService idGeneratorService); List<String> save(List<MultipartFile> filesToStore, String module, String tag, String tenantId); Resource retrieve(String fileStoreId, String tenantId); List<FileInfo> retrieveByTag(String tag, String tenantId); Map<String, String> getUrls(String tenantId, List<String> fileStoreIds);  }