public static String toUriAuthority(NetworkEndpoint networkEndpoint) {
    return toHostAndPort(networkEndpoint).toString();
  }
@Test
  public void toUriString_withHostnameAndPortEndpoint_returnsHostnameAndPort() {
    NetworkEndpoint hostnameAndPortEndpoint =
        NetworkEndpoint.newBuilder()
            .setType(NetworkEndpoint.Type.HOSTNAME_PORT)
            .setPort(Port.newBuilder().setPortNumber(8888))
            .setHostname(Hostname.newBuilder().setName("localhost"))
            .build();
    assertThat(NetworkEndpointUtils.toUriAuthority(hostnameAndPortEndpoint))
        .isEqualTo("localhost:8888");
  }