### Question:
UnicodeUtils { public static String normalizeString(String in) { int[] chars = in.codePoints().toArray(); StringBuilder res = new StringBuilder(in.length()); for (int code : chars) { res.append(normalizeCharacter(code)); } return res.toString(); }  static String normalizeString(String in); static String normalizeCharacter(int codePoint); static boolean isMathLatin(int codePoint); static boolean isMathGreek(int codePoint); static boolean isMathDigit(int codePoint);  }### Answer:
@Test public void normalizeString_boldA() { String boldA = "\uD835\uDC00"; String result = UnicodeUtils.normalizeString(boldA); assertEquals("A", result); }
@Test public void normalizeString_mathLatinLetters() throws Exception { List<String> lines = readTestData(); for (int i = 0; i < 26; i++) { String expected = i % 2 == 0 ? capitals : smalls; String mathString = lines.get(i); LOGGER.info("test data {}", mathString); String result = UnicodeUtils.normalizeString(mathString); assertEquals(expected, result); } }
@Test public void normalizeString_greekLetters() throws Exception { List<String> lines = readTestData(); for (int i = 26; i < 36; i++) { String expected = i % 2 == 0 ? greekCapitals : greekSmalls; String mathString = lines.get(i); LOGGER.info("test data {}", mathString); String result = UnicodeUtils.normalizeString(mathString); assertEquals(expected, result); } }
@Test public void normalizeString_digits() throws Exception { List<String> lines = readTestData(); for (int i = 36; i < 41; i++) { String mathString = lines.get(i); LOGGER.info("test data {}", mathString); String result = UnicodeUtils.normalizeString(mathString); assertEquals(digits, result); } }
@Test public void normalize_letterLikeSymbols() throws Exception { List<String> lines = readTestData("unicode2.txt"); for (String line : lines) { String[] split = line.split(" "); String expected = split[0]; String actual = UnicodeUtils.normalizeString(split[1]); assertEquals(expected, actual); } }