### Question:
StringUtils { public static String dotToUpperCamelCase(String input) throws IllegalArgumentException { if (input == null) throw new IllegalArgumentException("dotToDash argument must not be null"); StringBuilder nameBuilder = new StringBuilder(input.length()); boolean capitalize = true; for (char c : input.toCharArray()) if (c == '.') { capitalize = true; } else if (capitalize) { nameBuilder.append(Character.toUpperCase(c)); capitalize = false; } else { nameBuilder.append(Character.toLowerCase(c)); capitalize = false; } return nameBuilder.toString(); }  static String arrayFormat(String format, Object[] items); static Optional<String> cdr(String name, String... sep); static String car(String name, String... sep); static String lastOf(String qualifiedName, String... sep); static String untill(String qualifiedName, String... sep); static String dotToUpperCamelCase(String input); static String dotToDash(String input); static String camelCaseToDash(String input); static boolean isPackageFriendly(String moduleName); static String withoutTypeArgs(String javaTypeString); static String notEmptytrimmed(String param); static Optional<Tuple<String, String>> splitIntoTwo(String mappingString); static int countMatches(String theString, String... sep);  }### Answer:
@Test void testdotToUpperCamelCase_Fail() { assertThrows(IllegalArgumentException.class, () -> dotToUpperCamelCase(null) ); }
@Test void testDotToCamelUpperCase() { assertEquals("AbCd", dotToUpperCamelCase("ab.cd")); assertEquals("Ab", dotToUpperCamelCase("ab")); assertEquals("ABCD", dotToUpperCamelCase("a.b.c.d")); }