### Question:
FileUtil { public static boolean isDirExists(String dirPath) { if (dirPath == null) { return false; } return isDirExists(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 testIsDirExists() throws Exception { assertThat(FileUtil.isDirExists((String) null)).isFalse(); assertThat(FileUtil.isDirExists((File) null)).isFalse(); assertThat(FileUtil.isDirExists((Path) null)).isFalse(); Path dir = FileUtil.createTempDir(); assertThat(FileUtil.isDirExists(dir)).isTrue(); assertThat(FileUtil.isDirExists(dir.toString())).isTrue(); assertThat(FileUtil.isDirExists(dir.toFile())).isTrue(); }