private int createServerCache() throws IOException {
    cacheRule.createCache();

    RegionFactory<?, ?> regionFactory = cacheRule.getCache().createRegionFactory(REPLICATE);
    regionFactory.create(regionName);

    CacheServer cacheServer = cacheRule.getCache().addCacheServer();
    cacheServer.setMaximumTimeBetweenPings(1000000);
    cacheServer.setNotifyBySubscription(false);
    cacheServer.setPort(0);
    cacheServer.setSocketBufferSize(32768);
    cacheServer.start();
    return cacheServer.getPort();
  }
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