### Question:
Utils { public static String toCamelCase(String str) { if (str.equals(str.toUpperCase())) return str.toLowerCase(); if (str.length() <= 2) return str.toLowerCase(); val firstTwo = str.substring(0, 2); if (firstTwo.equals(firstTwo.toUpperCase())) { val first = str.replaceAll("^([A-Z]+)([A-Z][^A-Z]*)$", "$1"); val rest = str.substring(first.length()); return first.toLowerCase() + rest; } else { val first = str.replaceAll("^([A-Z]+[^A-Z])(.*)$", "$1"); val rest = str.substring(first.length()); return first.toLowerCase() + rest; } }  static String templateRange(int fromInclusive, int toExclusive, String delimiter); static String toTitleCase(String str); static String toCamelCase(String str); static String switchClassName(String targetName, List<Case> choices); static String switchClassName(String targetName, List<Case> choices, int skip); static String toListCode(List<D> list, Function<D, String> toCode); static String toStringLiteral(String str);  }### Answer:
@Test public void testCamelCase() { assertEquals("repeatAll", toCamelCase("RepeatAll")); assertEquals("rgbColor", toCamelCase("RGBColor")); assertEquals("rgb", toCamelCase("RGB")); assertEquals("repeat", toCamelCase("repeat")); assertEquals("repeat", toCamelCase("Repeat")); assertEquals("repeat", toCamelCase("REPEAT")); }