public static void validateEmptyBucketToTempQueueMap(String senderId) {
    GatewaySender sender = getGatewaySender(senderId);

    int size = 0;
    Set<RegionQueue> queues = ((AbstractGatewaySender) sender).getQueues();
    for (Object queue : queues) {
      PartitionedRegion region =
          (PartitionedRegion) ((ConcurrentParallelGatewaySenderQueue) 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();
        }
      }
    }

    final int finalSize = size;
    assertThat(finalSize).as("Expected elements in TempQueueMap: " + 0
        + " but actual size: " + finalSize).isEqualTo(0);

  }
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/WANTestBase.java