### Question:
NcNameResolver { public static String fixNcName(String nonNcName) { if (NcNameResolver.isNCName(nonNcName)) { return nonNcName; } StringBuilder sb = new StringBuilder(); char c = nonNcName.charAt(0); if (c == '_' || NcNameResolver.isLetter(c)) { sb.append(c); } else { sb.append('_'); } for (int i = 1; i < nonNcName.length(); i++) { char currentChar = nonNcName.charAt(i); if (NcNameResolver.isNCNameChar(currentChar)) { sb.append(currentChar); } else { sb.append('_'); } } return sb.toString(); }  static final boolean isNCName(String name); static final boolean isNCNameChar(char c); static final boolean isLetter(char c); static final boolean isIdeographic(char c); static final boolean isCombiningChar(char c); static final boolean isDigit(char c); static final boolean isExtender(char c); static String fixNcName(String nonNcName);  }### Answer:
@Test public void testFixNcName() { String noFixString = "this_one_needs_no_fixing"; String needsFixString = "1string&_needs_fixing"; String fixedString = "_string__needs_fixing"; assertEquals(noFixString, NcNameResolver.fixNcName(noFixString)); assertEquals(fixedString, NcNameResolver.fixNcName(needsFixString)); }