### Question:
FileNameSupport { public static String getFileName(String aCamelCaseName) { int lastMinusIdx = aCamelCaseName.lastIndexOf("-"); if (lastMinusIdx != -1) { aCamelCaseName = aCamelCaseName.substring(0, lastMinusIdx); } if (aCamelCaseName.startsWith("platypus-js-")) { aCamelCaseName = aCamelCaseName.substring("platypus-js-".length()); } char[] chars = aCamelCaseName.toCharArray(); StringBuilder sb = new StringBuilder(); for (int i = 0; i < aCamelCaseName.length(); i++) { sb.append(Character.toLowerCase(chars[i])); if (i < aCamelCaseName.length() - 1 && Character.isLowerCase(chars[i]) && Character.isUpperCase(chars[i + 1])) { sb.append('-'); } } return sb.toString(); }  static String getFileName(String aCamelCaseName);  }### Answer:
@Test public void testGetFileName() { assertEquals(FileNameSupport.getFileName("aSimpleName"), "a-simple-name"); assertEquals(FileNameSupport.getFileName("aSimpleNameX"), "a-simple-name-x"); assertEquals(FileNameSupport.getFileName("SimpleNameXY"), "simple-name-xy"); assertEquals(FileNameSupport.getFileName("SimpleNameXY-7.8.9"), "simple-name-xy"); assertEquals(FileNameSupport.getFileName("platypus-js-SimpleNameXY-7.8.9"), "simple-name-xy"); assertEquals(FileNameSupport.getFileName("SimpleNameXY"), "simple-name-xy"); }