@Test
  public void haRegionQueueClosesStatsWhenClientProxyIsClosed() {
    addIgnoredException(SocketException.class);
    addIgnoredException(IOException.class);

    client.invoke(this::createClientCache);
    server.invoke(this::doEntryOperations);

    server.invoke(this::closeProxyAndVerifyHARegionQueueStatsAreClosed);
    client.invoke(() -> clientCacheRule.getClientCache().close());

    server.invoke(this::verifyDispatchedMessagesMapIsEmpty);
  }
This test does the following: <br>
1) Create the client <br>
2) Do some operations from the cache-server <br>
3) Stop the primary cache-server <br>
4) Explicitly close the CacheClientProxy on the server. <br>
5) Verify that HARegionQueue stats are closed and entry for the ha region is removed from
dispatchedMessagesMap.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/HARegionQueueStatsCloseRegressionTest.java