### Question:
FileTool { public static File create(String fileName) { String[] filePath = fileName.split(Pattern.quote(File.separator)); String name = filePath[filePath.length - 1]; return create(fileName.replace(name, ""), name); } private  FileTool(); static List<String> reader(String fileName); static void writer(String destinationFolder, String fileName, String line); static File writer(String destinationFolder, String fileName, List<String> multiLine); static File create(String fileName); static File create(String destinationFolder, String fileName); static void copy(String fileSrc, String fileDest); static void copyFolderToFolder(String sourceFolder, String destinationFolder);  }### Answer:
@Test public void create() throws IOException { String destinationFolder = System.getProperty("java.io.tmpdir") + File.separator + "tata" + File.separator + "titi" + File.separator + "toto"; String fileName = "toto.txt"; File file = FileTool.create(destinationFolder, fileName); file.deleteOnExit(); Assert.assertTrue(file.createNewFile()); }
@Test public void create2() throws IOException { String fileName = System.getProperty("java.io.tmpdir") + File.separator + "tata2" + File.separator + "titi2" + File.separator + "toto2" + File.separator + "toto.txt"; File file = FileTool.create(fileName); file.deleteOnExit(); Assert.assertTrue(file.createNewFile()); }