public static String toUriAuthority(NetworkEndpoint networkEndpoint) {
    return toHostAndPort(networkEndpoint).toString();
  }
@Test
  public void toUriString_withIpV4Endpoint_returnsIpAddress() {
    NetworkEndpoint ipV4Endpoint =
        NetworkEndpoint.newBuilder()
            .setType(NetworkEndpoint.Type.IP)
            .setIpAddress(
                IpAddress.newBuilder().setAddress("1.2.3.4").setAddressFamily(AddressFamily.IPV4))
            .build();
    assertThat(NetworkEndpointUtils.toUriAuthority(ipV4Endpoint)).isEqualTo("1.2.3.4");
  }