@Test void testWithArchiveNameWithoutParts() throws FileStorageException { List<FileEntry> fileEntryWithoutParts = createFileEntriesFromFile(FILE_ENTRY_WITHOUT_PARTS); archiveMerger.createArchiveFromParts(fileEntryWithoutParts); Mockito.verify(fileService) .consumeFileContent(any(), any(), any()); }
public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts); }
ArchiveMerger { public Path createArchiveFromParts(List<FileEntry> archiveParts) { List<FileEntry> sortedArchiveParts = sort(archiveParts); String archiveName = getArchiveName(sortedArchiveParts.get(0)); try (FilePartsMerger filePartsMerger = new FilePartsMerger(archiveName)) { mergeArchiveParts(sortedArchiveParts, filePartsMerger); return filePartsMerger.getMergedFilePath(); } } ArchiveMerger(FileService fileService, StepLogger stepLogger, DelegateExecution execution); Path createArchiveFromParts(List<FileEntry> archiveParts);  }