  public void testIPv6Host() throws Exception {
    List<InetSocketAddress> addrs = AddrUtil.getAddresses("::1:80");
    assertEquals(1, addrs.size());
    Set<String> validLocalhostNames = new HashSet<String>();
    validLocalhostNames.add("localhost");
    validLocalhostNames.add("ip6-localhost");
    validLocalhostNames.add("localhost6.localdomain6");
    assert (validLocalhostNames.contains(addrs.get(0).getHostName()));
    assertEquals(80, addrs.get(0).getPort());
  }

  public void testIPv6Host() throws Exception {
    List<InetSocketAddress> addrs = AddrUtil.getAddresses("::1:80");
    assertEquals(1, addrs.size());
    Set<String> validLocalhostNames = new HashSet<String>();
    validLocalhostNames.add("localhost");
    validLocalhostNames.add("ip6-localhost");
    validLocalhostNames.add("0:0:0:0:0:0:0:1");
    validLocalhostNames.add("localhost6.localdomain6");
    assert (validLocalhostNames.contains(addrs.get(0).getHostName()));
    assertEquals(80, addrs.get(0).getPort());
  }
