### Question:
Strings { public static List<String> splitJavaIdentifier(String string) { assert string != null; List<String> result = new ArrayList<String>(); int startIndex = 0; while (startIndex < string.length()) { if (Character.isLowerCase(string.charAt(startIndex))) { int i = startIndex; while (i < string.length() && Character.isLowerCase(string.charAt(i))) { i++; } result.add(string.substring(startIndex, i)); startIndex = i; } else if (Character.isUpperCase(string.charAt(startIndex))) { if (string.length() - startIndex == 1) { result.add(Character.toString(string.charAt(startIndex++))); } else if (Character.isLowerCase(string.charAt(startIndex + 1))) { int i = startIndex + 1; while (i < string.length() && Character.isLowerCase(string.charAt(i))) { i++; } result.add(string.substring(startIndex, i)); startIndex = i; } else { int i = startIndex + 1; while (i < string.length() && Character.isUpperCase(string.charAt(i)) && (string.length()-i == 1 || Character.isUpperCase(string.charAt(i+1)))) { i++; } result.add(string.substring(startIndex, i)); startIndex = i; } }else { result.add(Character.toString(string.charAt(startIndex++))); } } return result; }  static String fixCase(String s); static String joinStrings(List<String> strings, boolean fixCase, char withChar); static List<String> splitJavaIdentifier(String string);  }### Answer:
@Test public void testSplitJavaIdentifier() { System.out.println("splitJavaIdentifier"); String[] cases = { "", "void", "splitJavaIdentifier", "NUnit", "feedURL", "ConvertURLClass" }; String[] dashJoined = { "", "void", "split-java-identifier", "n-unit", "feed-URL", "convert-URL-class" }; for (int i = 0; i < cases.length; i++) { assertEquals(dashJoined[i], Strings.joinStrings( Strings.splitJavaIdentifier(cases[i]), true, '-')); } }