### Question:
IrisFileName { public static String clean(String fileName, String invalidCharReplacement) { if (fileName == null) return null; fileName = fileName.trim(); StringBuilder cleanName = new StringBuilder(); int len = fileName.codePointCount(0, fileName.length()); for (int i = 0; i < len; i++) { int c = fileName.codePointAt(i); if (Arrays.binarySearch(INVALID_CHARS, c) < 0) { cleanName.appendCodePoint(c); } else { cleanName.append(invalidCharReplacement); } } return cleanName.toString(); }  static Boolean containsInvalidCharacter(String fileName); static String clean(String fileName, String invalidCharReplacement); static boolean isValid(String fileName); static final int MAX_FILENAME_LENGTH; }### Answer:
@Test public void testClean() { String fileName = IrisFileName.clean("good.txt", "_"); Assert.assertEquals(fileName, "good.txt"); fileName = IrisFileName.clean("foo-ä-€.html", "_"); Assert.assertEquals(fileName, "foo-ä-€.html"); fileName = IrisFileName.clean("dsfd?.html", "_"); Assert.assertEquals(fileName, "dsfd_.html"); fileName = IrisFileName.clean("foo-ä-€.?html", "_"); Assert.assertEquals(fileName, "foo-ä-€._html"); fileName = IrisFileName.clean(" foo-ä-€.?html\t", "_"); Assert.assertEquals(fileName, "foo-ä-€._html"); }