@Test
  public void testServerSocketFromLocalhostResolution() throws IOException {
    InetAddress[] addrs = { InetAddress.getLocalHost() };
    for (InetAddress addr : addrs) {
      LOG.info("Resolved localhost as: " + addr);
      bindServerSocket(addr);
      bindNIOServerSocket(addr);
    }
  }
Tests whether every InetAddress we obtain by resolving can open a ServerSocketChannel.
hbase-server/src/test/java/org/apache/hadoop/hbase/TestIPv6NIOServerSocketChannel.java