### Question:
StringUtils { public static String fieldNameToPath(String fieldName) { final StringBuilder path = new StringBuilder(); boolean lastUpper = true; for (char c : fieldName.toCharArray()) { if (c == '_') { lastUpper = true; path.append('.'); continue; } if (Character.isUpperCase(c)) { c = Character.toLowerCase(c); if (!lastUpper) { lastUpper = true; path.append('-'); } } else { lastUpper = false; } path.append(c); } return path.toString(); } private  StringUtils(); static String implode(String delimiter, String[] strings); static String fieldNameToPath(String fieldName); static boolean isEmpty(String string);  }### Answer:
@Test public void fieldNameToPathTest() throws Exception { assertEquals("camel-casing", StringUtils.fieldNameToPath("CamelCasing")); assertEquals("camel.casing", StringUtils.fieldNameToPath("Camel_Casing")); }