public static String toUriAuthority(NetworkEndpoint networkEndpoint) {
    return toHostAndPort(networkEndpoint).toString();
  }
@Test
  public void toUriString_withIpV6Endpoint_returnsIpAddressWithBracket() {
    NetworkEndpoint ipV6Endpoint =
        NetworkEndpoint.newBuilder()
            .setType(NetworkEndpoint.Type.IP)
            .setIpAddress(
                IpAddress.newBuilder().setAddress("3ffe::1").setAddressFamily(AddressFamily.IPV6))
            .build();
    assertThat(NetworkEndpointUtils.toUriAuthority(ipV6Endpoint)).isEqualTo("[3ffe::1]");
  }