@Test
  public void equals_LocatorAddress_from_resolved_and_unresolved_SocketAddress() {
    HostAndPort locator1 = new HostAndPort("localhost", 8080);

    InetSocketAddress host2address = locator1.getSocketInetAddress();
    HostAndPort locator2 = new HostAndPort("localhost", host2address.getPort());

    assertThat(host2address.isUnresolved()).isFalse();
    assertThat(locator1.equals(locator2)).isTrue();
  }
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