@Test
  public void testPingWrongServer() {
    PORT1 = initServerCache(true);
    initServerCache2();
    InternalDistributedMember server2ID = server2.invoke("get ID", () -> cache.getMyId());
    pool = (PoolImpl) createClientCache(NetworkUtils.getServerHostName(), PORT1);
    // send the ping to server1 but use server2's identifier so the ping will be forwarded
    ClientProxyMembershipID proxyID = server1.invoke(
        () -> CacheClientNotifier.getInstance().getClientProxies().iterator().next().getProxyID());
    server2.invoke(() -> {
      assertThat(ClientHealthMonitor.getInstance().getClientHeartbeats().containsKey(proxyID))
          .isFalse();
      assertThat(ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size())
          .isEqualTo(0);
    });
    PingOp.execute(pool, new ServerLocation(NetworkUtils.getServerHostName(), PORT1), server2ID);
    // if the ping made it to server2 it will have the client's ID in its health monitor
    server2.invoke(() -> {
      await("For heartbeat to be received").untilAsserted(() -> assertThat(
          ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().size())
              .isEqualTo(1));
      ClientProxyMembershipID proxyIDFound =
          ClientHealthMonitor.getInstance().getClientHeartbeats().keySet().iterator().next();
      assertThat(
          ClientHealthMonitor.getInstance().getClientHeartbeats().containsKey(proxyID))
              .isTrue();
    });
  }
Ensure that an Invalidate event that
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java