### Question:
PathUtils { public static boolean isFileHidden(Path file){ List<String> illegal = new ArrayList<String>(); illegal.add("$"); illegal.add("."); illegal.add("~"); return illegal.stream().anyMatch(pattern -> file.getFileName().toString().startsWith(pattern)); }  static String computeFileContentHash(Path path); static String base64Encode(byte[] bytes); static byte[] base64Decode(String data); static boolean isFileHidden(Path file); static Path getCommonPath(Path path1, Path path2);  }### Answer:
@Test public void isFileHiddenTest(){ assertTrue(PathUtils.isFileHidden(Paths.get(".file"))); assertTrue(PathUtils.isFileHidden(Paths.get("~file"))); assertTrue(PathUtils.isFileHidden(Paths.get("$file"))); assertFalse(PathUtils.isFileHidden(Paths.get("file"))); }