### Question:
FileUtil { public static void makesureDirExists(String dirPath) throws IOException { makesureDirExists(getPath(dirPath)); }  static byte[] toByteArray(final File file); static String toString(final File file); static List<String> toLines(final File file); static void write(final CharSequence data, final File file); static void append(final CharSequence data, final File file); static InputStream asInputStream(String fileName); static InputStream asInputStream(File file); static InputStream asInputStream(Path path); static OutputStream asOutputStream(String fileName); static OutputStream asOutputStream(File file); static OutputStream asOutputStream(Path path); static BufferedReader asBufferedReader(String fileName); static BufferedReader asBufferedReader(Path path); static BufferedWriter asBufferedWriter(String fileName); static BufferedWriter asBufferedWriter(Path path); static void copy(@NotNull File from, @NotNull File to); static void copy(@NotNull Path from, @NotNull Path to); static void copyFile(@NotNull File from, @NotNull File to); static void copyFile(@NotNull Path from, @NotNull Path to); static void copyDir(@NotNull File from, @NotNull File to); static void copyDir(@NotNull Path from, @NotNull Path to); static void moveFile(@NotNull File from, @NotNull File to); static void moveFile(@NotNull Path from, @NotNull Path to); static void moveDir(@NotNull File from, @NotNull File to); static void touch(String filePath); static void touch(File file); static void deleteFile(@Nullable File file); static void deleteFile(@Nullable Path path); static void deleteDir(Path dir); static void deleteDir(File dir); static boolean isDirExists(String dirPath); static boolean isDirExists(Path dirPath); static boolean isDirExists(File dir); static void makesureDirExists(String dirPath); static void makesureDirExists(File file); static void makesureDirExists(Path dirPath); static void makesureParentDirExists(File file); static boolean isFileExists(String fileName); static boolean isFileExists(File file); static boolean isFileExists(Path path); static Path createTempDir(); static Path createTempFile(); static Path createTempFile(String prefix, String suffix); static String getFileName(@NotNull String fullName); static String getFileExtension(File file); static String getFileExtension(String fullName);  }### Answer:
@Test public void testMakesureDirExists() throws Exception { Path dir = FileUtil.createTempDir(); String child1 = "child1"; Path child1Dir = dir.resolve(child1); FileUtil.makesureDirExists(child1Dir.toString()); assertThat(child1Dir).exists(); String child2 = "child2"; Path child2Dir = dir.resolve(child2); FileUtil.makesureDirExists(child2Dir); assertThat(child2Dir).exists(); String child3 = "child3"; Path child3Dir = dir.resolve(child3); FileUtil.makesureDirExists(child3Dir.toFile()); assertThat(child3Dir).exists(); }