private static void verifyRegionSize(final Integer msgsRegionSize) {

    GeodeAwaitility.await().until(() -> {
      try {
        // Get the clientMessagesRegion and check the size.
        Region<Object, Object> region = cache.getRegion(SEPARATOR + regionName);
        int sz = region.size();
        if (sz != 1) {
          return false;
        }
        Iterator iterator = cache.getCacheServers().iterator();
        if (!iterator.hasNext()) {
          return true;
        }
        InternalCacheServer server = (InternalCacheServer) iterator.next();
        sz = server.getAcceptor().getCacheClientNotifier().getHaContainer().size();
        return sz == msgsRegionSize;
      } catch (Exception e) {
        return false;
      }
    });
  }
This test verifies that the memory footprint of the ha region queues is less when ha-overflow
is enabled (with an appropriate value of haCapacity) compared to when it is disabled, for the
same amount of data feed.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HARQueueNewImplDistributedTest.java