@Test
  public void getPort_returns_port() {
    HostAndPort locator1 = new HostAndPort("localhost", 8090);
    assertThat(locator1.getPort()).isEqualTo(8090);
  }
Test whether HostAndPort are equal, when created from resolved and unresolved
InetSocketAddress
geode-tcp-server/src/test/java/org/apache/geode/distributed/internal/tcpserver/HostAndPortTest.java