Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Max Lepikhin <[email protected]>
  • Loading branch information
maxlepikhin committed Nov 6, 2024
1 parent 78a7c88 commit f6d611e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ public void testSplitFileIntoChunks() throws Exception {

// Split file into chunks.
int chunkSize = 325;
List<String> chunkPaths = FileUtils
.splitFileIntoChunks(file, tempDir.newFolder().toPath(), chunkSize);
List<String> chunkPaths = FileUtils.splitFileIntoChunks(file, tempDir.newFolder().toPath(), chunkSize);

// Verify.
int currentPosition = 0;
for (String chunkPath : chunkPaths) {
byte[] chunk = Files.readAllBytes(Path.of(chunkPath));
assertTrue("Chunk size", currentPosition + chunk.length <= data.length);
Assert.assertArrayEquals(Arrays
.copyOfRange(data, currentPosition, currentPosition + chunk.length), chunk);
Assert.assertArrayEquals(Arrays.copyOfRange(data, currentPosition, currentPosition + chunk.length), chunk);
currentPosition += chunk.length;
}
assertEquals(currentPosition, data.length);
Expand Down

0 comments on commit f6d611e

Please sign in to comment.