@Ignore @Test public void shouldSaveArtifactToRepository() throws Exception { List<org.egov.filestore.domain.model.Artifact> listOfMockedArtifacts = getListOfArtifacts(); artifactRepository.save(listOfMockedArtifacts); verify(diskFileStoreRepository).write(listOfMockedArtifacts); }
public List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts) { cloudFilesManager.saveFiles(artifacts); List<Artifact> artifactEntities = new ArrayList<>(); artifacts.forEach(artifact -> { artifactEntities.add(mapToEntity(artifact)); }); return fileStoreJpaRepository.save(artifactEntities).stream() .map(Artifact::getFileStoreId) .collect(Collectors.toList()); }
ArtifactRepository { public List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts) { cloudFilesManager.saveFiles(artifacts); List<Artifact> artifactEntities = new ArrayList<>(); artifacts.forEach(artifact -> { artifactEntities.add(mapToEntity(artifact)); }); return fileStoreJpaRepository.save(artifactEntities).stream() .map(Artifact::getFileStoreId) .collect(Collectors.toList()); } }
ArtifactRepository { public List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts) { cloudFilesManager.saveFiles(artifacts); List<Artifact> artifactEntities = new ArrayList<>(); artifacts.forEach(artifact -> { artifactEntities.add(mapToEntity(artifact)); }); return fileStoreJpaRepository.save(artifactEntities).stream() .map(Artifact::getFileStoreId) .collect(Collectors.toList()); } ArtifactRepository(DiskFileStoreRepository diskFileStoreRepository,
			FileStoreJpaRepository fileStoreJpaRepository); }
ArtifactRepository { public List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts) { cloudFilesManager.saveFiles(artifacts); List<Artifact> artifactEntities = new ArrayList<>(); artifacts.forEach(artifact -> { artifactEntities.add(mapToEntity(artifact)); }); return fileStoreJpaRepository.save(artifactEntities).stream() .map(Artifact::getFileStoreId) .collect(Collectors.toList()); } ArtifactRepository(DiskFileStoreRepository diskFileStoreRepository,
			FileStoreJpaRepository fileStoreJpaRepository); List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts); Resource find(String fileStoreId, String tenantId); List<FileInfo> findByTag(String tag, String tenantId); List<Artifact> getByTenantIdAndFileStoreIdList(String tenantId, List<String> fileStoreIds); }
ArtifactRepository { public List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts) { cloudFilesManager.saveFiles(artifacts); List<Artifact> artifactEntities = new ArrayList<>(); artifacts.forEach(artifact -> { artifactEntities.add(mapToEntity(artifact)); }); return fileStoreJpaRepository.save(artifactEntities).stream() .map(Artifact::getFileStoreId) .collect(Collectors.toList()); } ArtifactRepository(DiskFileStoreRepository diskFileStoreRepository,
			FileStoreJpaRepository fileStoreJpaRepository); List<String> save(List<org.egov.filestore.domain.model.Artifact> artifacts); Resource find(String fileStoreId, String tenantId); List<FileInfo> findByTag(String tag, String tenantId); List<Artifact> getByTenantIdAndFileStoreIdList(String tenantId, List<String> fileStoreIds);  }