public static int sizeOfBucketToTempQueueMap(String senderId) {
    GatewaySender sender =
        Objects.requireNonNull(ClusterStartupRule.getCache()).getGatewaySender(senderId);
    int size = 0;
    Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
    for (RegionQueue queue : queues) {
      PartitionedRegion region =
          (PartitionedRegion) queue.getRegion();
      int buckets = region.getTotalNumberOfBuckets();
      for (int bucket = 0; bucket < buckets; bucket++) {
        BlockingQueue<GatewaySenderEventImpl> newQueue =
            ((ConcurrentParallelGatewaySenderQueue) queue).getBucketTmpQueue(bucket);
        if (newQueue != null) {
          size += newQueue.size();
        }
      }
    }
    return size;
  }
Checks that the bucketToTempQueueMap for a partitioned region
that holds events for buckets that are not available locally, is empty.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderAndCQDurableClientDUnitTest.java