### Question:
FileUtils { public static void delete(File file) { if (file != null) { boolean result = file.delete(); if (!result) { ConsoleLogger.warning("Could not delete file '" + file + "'"); } } } private  FileUtils(); static boolean copyFileFromResource(File destinationFile, String resourcePath); static boolean createDirectory(File dir); static InputStream getResourceFromJar(String path); static void purgeDirectory(File directory); static void delete(File file); static void create(File file); static String makePath(String... elements); static String createCurrentTimeString(); static String createBackupFilePath(File file);  }### Answer:
@Test public void shouldDeleteFile() throws IOException { File file = temporaryFolder.newFile(); assertThat(file.exists(), equalTo(true)); FileUtils.delete(file); assertThat(file.exists(), equalTo(false)); }
@Test public void shouldDoNothingForNullFile() { File file = null; FileUtils.delete(file); }