### Question:
XmlUtils { public static String createValidId(String value) { if (isEmpty(value)) { return "_"; } StringBuilder resultId = new StringBuilder(); for (int i = 0; i < value.length(); i++) { if (isNcNameCharacter(value.charAt(i))) { resultId.append(value.charAt(i)); } } String result = resultId.toString(); if (isEmpty(result)) { return "_"; } if (isNcNameStartCharacter(result.charAt(0))) { return result; } return "_" + result; } private  XmlUtils(); static boolean isNcNameStartCharacter(char ch); static boolean isNcNameCharacter(char ch); static String createValidId(String value);  }### Answer:
@Test public void testDefaultValidName() { assertEquals("_", createValidId("")); assertEquals("_", createValidId(null)); assertEquals("_", createValidId("&")); assertEquals("_", createValidId("#")); assertEquals("_", createValidId(" ")); assertEquals("_", createValidId("£")); }
@Test public void testFullyValidName() { String name = "SomeValidNameForTheПроцесс"; assertEquals(name, createValidId(name)); }
@Test public void testSomeSymbolsCleared() { String name = "Hello $& Name"; assertEquals("HelloName", createValidId(name)); }
@Test public void testCreateValidIdWhenFirstSymbolIsNotCorrectNcStart() { String name = "1name"; assertEquals("_1name", createValidId(name)); }