private void checkEndpoints(VM vm, final int... expectedPorts) {
    vm.invoke("Check endpoint", () -> {
      PoolImpl pool = (PoolImpl) PoolManager.find(POOL_NAME);
      HashSet<Integer> expectedEndpointPorts = new HashSet<>();
      for (int expectedPort : expectedPorts) {
        expectedEndpointPorts.add(expectedPort);
      }
      await().untilAsserted(() -> {
        List<ServerLocationAndMemberId> endpoints;
        HashSet<Integer> actualEndpointPorts;
        endpoints = pool.getCurrentServers();
        actualEndpointPorts = new HashSet<>();
        for (ServerLocationAndMemberId slAndMemberId : endpoints) {
          actualEndpointPorts.add(slAndMemberId.getServerLocation().getPort());
        }
        assertEquals(expectedEndpointPorts, actualEndpointPorts);
      });
    });
  }
Assert that there is one endpoint with the given host in port on the client vm.

@param vm - the vm the client is running in
@param expectedPorts - The server ports we expect the client to be connected to.
geode-core/src/distributedTest/java/org/apache/geode/cache/client/internal/AutoConnectionSourceDUnitTest.java