### Question:
FileUtils { public static boolean mkdirsMaybe(File f) { return f != null && (f.isDirectory() || f.mkdirs()); }  static void setFileProperties(); static File getParentFile(File f); static boolean mkdirsMaybe(File f); static boolean deleteFileMaybe(File f); static File[] listFiles(File f); static File[] listFiles(File f, FileFilter ff); static File[] listFiles(File f, FilenameFilter fnf); static boolean safeIsDirectory(File f); static boolean safeIsRealDirectory(String s); static boolean safeIsRealDirectory(File f); static boolean safeIsDirectory(String s); static String safeGetCanonicalPath(File f); static File safeGetCanonicalFile(File f); static boolean hasExtension(String filename, String ext); static boolean hasExtension(File f, String ext); static boolean hasExtensionIgnoreCase(String filename, String ext); static boolean hasExtensionIgnoreCase(File f, String ext); static boolean isLegalFilename(String filename); static boolean isFriendlyFilename(String filename); static String makeLegalFilename(String filename); static String makeLegalNoBlankFileName(String filename); static String makeFriendlyFilename(String filename); static String makeFriendlyFilenameNoExtension(String filename); static String makeFriendlyFilenameExtension(String filename); static String revertFriendlyFilenameExtension(String filename); static String revertFriendlyFilename(String filename); static void liquidate(File parent); static boolean isJar(String filename); static boolean isZip(String filename); static boolean isJar(File f); static boolean isZip(File f); static boolean whack(File parent); static boolean whack(File parent, Collection<File> undeletedFiles); static void deleteFileNowOrLater(File f); static void deleteOnExit(File f); static boolean deleteFileWithWaitLoop(File f); static boolean deleteFile(File f); static FileOutputStream openFileOutputStream(File out); static Set<File> getAllFilesUnder(File directory, FilenameFilter filenameFilter); static Set<File> getAllFilesUnder(File directory, FilenameFilter filenameFilter, boolean relativize); static Set<File> getAllFilesAndDirectoriesUnder(File directory); static File relativize(File parent, File child); static String formatFileCollection(Collection<File> files); static File getDirectory(File f); static File createTempFile(File directory); static File[] listAllFiles(File dirName, String ext); static List<File> searchDir(File dirName, String ext); static void copy(String from, String to); static void copy(File fin, File fout); static void copyTree(File din, File dout); static String makeForwardSlashes(String inputStr); static String quoteString(String s); static String getIllegalFilenameCharacters(); static void copyFile(File fin, File fout); static void copy(InputStream in, FileOutputStream out, long size); static void copyWithoutClose(InputStream in, FileOutputStream out, long size); static void copy(InputStream in, OutputStream os, long size); static boolean renameFile(File fromFile, File toFile); static void appendText(String fileName, String line); static void appendText(String fileName, StringBuilder buffer); static String readSmallFile(final String fileName); static String readSmallFile(final File file); static File getManagedFile(String file, File dir); static void writeStringToFile(String s, File f); static File[] findFilesInDir(File dir, final String regexp); static String resourceToString(String resourceName); static byte[] resourceToBytes(String resourceName);  }### Answer:
@Test public void testMkdirsMaybe() { assertFalse(FileUtils.mkdirsMaybe(null)); File f = new File(".").getAbsoluteFile(); assertFalse(FileUtils.mkdirsMaybe(null)); File d1 = new File("junk" + System.currentTimeMillis()); File d2 = new File("gunk" + System.currentTimeMillis()); assertTrue(d1.mkdirs()); assertFalse(d1.mkdirs()); assertTrue(FileUtils.mkdirsMaybe(d1)); assertTrue(FileUtils.mkdirsMaybe(d1)); assertTrue(FileUtils.mkdirsMaybe(d2)); assertTrue(FileUtils.mkdirsMaybe(d2)); assertFalse(d2.mkdirs()); if (!d1.delete()) d1.deleteOnExit(); if (!d2.delete()) d2.deleteOnExit(); }