public static void checkAsyncEventQueueSize(String asyncQueueId, int numQueueEntries,
      boolean localSize) {
    AsyncEventQueueImpl aeq = (AsyncEventQueueImpl) cache.getAsyncEventQueue(asyncQueueId);
    GatewaySender sender = aeq.getSender();

    if (sender.isParallel()) {
      Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
      Region queueRegion = queues.toArray(new RegionQueue[queues.size()])[0].getRegion();
      if (localSize) {
        queueRegion = PartitionRegionHelper.getLocalData(queueRegion);
      }
      assertEquals(numQueueEntries, queueRegion.size());
    } else {
      Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
      int size = 0;
      for (RegionQueue q : queues) {
        size += q.size();
      }
      assertEquals(numQueueEntries, size);
    }
  }
@deprecated Please use {@link DistributedRule} and Geode User APIs or {@link ClusterStartupRule}
            instead.
geode-dunit/src/main/java/org/apache/geode/internal/cache/wan/AsyncEventQueueTestBase.java