### Question:
FileUtils { public static List<Path> splitFile(final String fileName,final String target, final int mBperSplit) throws IOException { if (mBperSplit <= 0) { throw new IllegalArgumentException("mBperSplit must be more than zero"); } List<Path> partFiles = new ArrayList<>(); final long sourceSize = Files.size(Paths.get(fileName)); final long bytesPerSplit = 1024L * 1024L * mBperSplit; final long numSplits = sourceSize / bytesPerSplit; final long remainingBytes = sourceSize % bytesPerSplit; int position = 0; try (RandomAccessFile sourceFile = new RandomAccessFile(fileName, "r"); FileChannel sourceChannel = sourceFile.getChannel()) { for (; position < numSplits; position++) { writePartToFile(target , bytesPerSplit, position , sourceChannel, partFiles); } if (remainingBytes > 0) { writePartToFile(target, remainingBytes, position , sourceChannel, partFiles); } } return partFiles; }  static void unzip(File file, String target); static void gunzip(File file, String target); static List<Path> splitFile(final String fileName,final String target, final int mBperSplit);  }### Answer:
@Test public void splitFile() throws IOException { unzip(); final File file = new File(System.getProperty("user.dir") + "/target/unZipped.txt"); final List<Path> paths = FileUtils.splitFile(file.getAbsolutePath(),System.getProperty("user.dir") + "/target/target", 50); Assert.assertFalse(paths.isEmpty()); Assert.assertEquals(paths.size(),21); }