CamelCaseUtils { public static List<String> split(String camelCaseText) { return split(camelCaseText, element -> element); } private  CamelCaseUtils(); static List<String> split(String camelCaseText); static List<String> split(String camelCaseText, Function<String, String> mapper); static final String CAMEL_CASE_PATTERN; }
@Test void split() { Assertions.assertEquals(Arrays.asList("camel", "Case"), CamelCaseUtils.split("camelCase")); Assertions.assertEquals(Arrays.asList("To", "Pascal", "Case"), CamelCaseUtils.split("toPascalCase", StringUtils::capitalize)); }