### Question:
UtilFile { public static void deleteFile(File file) { Check.notNull(file); try { Files.delete(file.toPath()); } catch (final IOException exception) { throw new LionEngineException(exception, ERROR_DELETE_FILE + file.getAbsolutePath()); } } private  UtilFile(); static String removeExtension(String file); static String normalizeExtension(String file, String extension); static String getExtension(String file); static String getExtension(File file); static List<File> getFiles(File directory); static List<File> getFilesByExtension(File path, String extension); static List<File> getFilesByName(File path, String name); static void deleteFile(File file); static boolean exists(String path); static boolean isFile(String path); static boolean isType(File file, String extension);  }### Answer:
@Test void testDeleteFile() throws IOException { final File file = Files.createTempFile("temp", ".tmp").toFile(); assertTrue(file.exists()); UtilFile.deleteFile(file); assertFalse(file.exists()); }
@Test void testDeleteFileError() throws IOException { assertThrows(() -> UtilFile.deleteFile(new File("void")), UtilFile.ERROR_DELETE_FILE + new File("void").getAbsolutePath()); }