### Question:
Util { public static int countChars(String string, int character) { int count = 0; int currIndex = 0; while (true) { currIndex = string.indexOf(character, currIndex); if (currIndex == -1) break; ++currIndex; ++count; } return count; }  static int countChars(String string, int character); static void getFilesRecursive(File directory, String suffix, List<File> files); static String readFile(File file);  }### Answer:
@Test public void testCountChars() { assertTrue(Util.countChars("abcxdefxghix", 'x') == 3); assertTrue(Util.countChars("", 'x') == 0); assertTrue(Util.countChars("abc\ndef", '\n') == 1); }