private void createClientCache() {
    clientCacheRule.createClientCache();

    Pool pool = PoolManager.createFactory().addServer(hostName, port).setSubscriptionEnabled(true)
        .setReadTimeout(10000).setSocketBufferSize(32768)
        .setMinConnections(3).setSubscriptionRedundancy(-1).create(uniqueName);

    ClientRegionFactory<Object, ?> clientRegionFactory =
        clientCacheRule.getClientCache().createClientRegionFactory(LOCAL);
    clientRegionFactory.setPoolName(pool.getName());

    Region<Object, ?> region = clientRegionFactory.create(regionName);
    region.registerInterest("ALL_KEYS");
  }
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