### Question:
IdGenerator { public static String sanitizeHostName(String hostName) { boolean changed = false; StringBuilder sb = new StringBuilder(); for (char ch : hostName.toCharArray()) { if (ch < 127) { sb.append(ch); } else { changed = true; } } if (changed) { String newHost = sb.toString(); LOG.info("Sanitized hostname from: {} to: {}", hostName, newHost); return newHost; } else { return hostName; } } IdGenerator(String prefix);  IdGenerator(); static String getHostName(); synchronized String generateId(); static String sanitizeHostName(String hostName); String generateSanitizedId(); static String getSeedFromId(String id); static long getSequenceFromId(String id); static int compare(String id1, String id2); static final String PROPERTY_IDGENERATOR_HOSTNAME; static final String PROPERTY_IDGENERATOR_LOCALPORT; static final String PROPERTY_IDGENERATOR_PORT; }### Answer:
@Test public void testSanitizeHostName() throws Exception { assertEquals("somehost.lan", IdGenerator.sanitizeHostName("somehost.lan")); assertEquals("otherhost.lan", IdGenerator.sanitizeHostName("other\u0E08host.lan")); }