private static void verifyRegionSize(final Integer regionSize, final Integer msgsRegionSize) {
    GeodeAwaitility.await().until(() -> {
      // Get the clientMessagesRegion and check the size.
      Region<Object, Object> region = cache.getRegion(SEPARATOR + regionName);
      int sz = region.size();
      if (regionSize != sz) {
        return false;
      }

      Iterator iterator = cache.getCacheServers().iterator();
      if (iterator.hasNext()) {
        InternalCacheServer server = (InternalCacheServer) iterator.next();
        Map msgsRegion = server.getAcceptor().getCacheClientNotifier().getHaContainer();

        sz = msgsRegion.size();
        return msgsRegionSize == sz;
      }
      return true;
    });
  }
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