@Test
public void testNormalizeHostName() {	

  List<String> hosts = Arrays.asList(new String[] {"127.0.0.1",
      "localhost", "3w.org", "UnknownHost123"});
  List<String> normalizedHosts = NetUtils.normalizeHostNames(hosts);
  // when ipaddress is normalized, same address is expected in return
  assertEquals(normalizedHosts.get(0), hosts.get(0));
  // for normalizing a resolvable hostname, resolved ipaddress is expected in return
  assertFalse(normalizedHosts.get(1).equals(hosts.get(1)));
  assertEquals(normalizedHosts.get(1), hosts.get(0));
  // this address HADOOP-8372: when normalizing a valid resolvable hostname start with numeric, 
  // its ipaddress is expected to return
  assertFalse(normalizedHosts.get(2).equals(hosts.get(2)));
  // return the same hostname after normalizing a irresolvable hostname.
  assertEquals(normalizedHosts.get(3), hosts.get(3));
}