@Test
public void testUpdateSocketAddress() throws IOException {

  InetSocketAddress addr = NetUtils.createSocketAddrForHost("host", 1);
  InetSocketAddress connectAddr = conf.updateConnectAddr("myAddress", addr);
  assertEquals(connectAddr.getHostName(), addr.getHostName());
  addr = new InetSocketAddress(1);
  connectAddr = conf.updateConnectAddr("myAddress", addr);
  assertEquals(connectAddr.getHostName(),
      InetAddress.getLocalHost().getHostName());
}