### Question:
UtilFile { public static boolean isType(File file, String extension) { Check.notNull(extension); if (file != null && file.isFile()) { final String current = getExtension(file); return current.equals(extension.replace(Constant.DOT, Constant.EMPTY_STRING)); } return false; } 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 testIsType() { assertFalse(UtilFile.isType(null, Constant.EMPTY_STRING)); assertFalse(UtilFile.isType(new File("null"), Constant.EMPTY_STRING)); assertFalse(UtilFile.isType(new File(System.getProperty("java.io.tmpdir")), Constant.EMPTY_STRING)); assertTrue(UtilFile.isType(Medias.create("file").getFile(), Constant.EMPTY_STRING)); assertTrue(UtilFile.isType(Medias.create("file1.txt").getFile(), "txt")); }