### Question:
FileUtils { public static String getFileExtension(String fileName) { int dotIndex = fileName.lastIndexOf('.'); if (dotIndex == -1) { return ""; } return fileName.substring(dotIndex + 1).toLowerCase(Locale.ROOT); } private  FileUtils(); static String getFileExtension(String fileName);  }### Answer:
@Test public void getFileExtensionTest() { assertEquals("txt", FileUtils.getFileExtension("xxxx.txt")); assertEquals("pdf", FileUtils.getFileExtension("xxxx.pdf")); assertEquals("doc", FileUtils.getFileExtension("xxxx.doc")); assertEquals("jpeg", FileUtils.getFileExtension("xxxx.jpeg")); assertEquals("png", FileUtils.getFileExtension("xxxx.png")); assertEquals("jpg", FileUtils.getFileExtension("xxxx.jpg")); assertEquals("mp4", FileUtils.getFileExtension("xxxx.mp4")); assertEquals("avi", FileUtils.getFileExtension("xxxx.avi")); }