public static <K> Map<String, List<K>> checkBR(String regionName, int numBuckets) {
    PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
    HashMap<String, List<K>> listenerAttrs = new HashMap<>();
    for (int i = 0; i < numBuckets; i++) {
      BucketRegion br = region.getBucketRegion(i);
      @SuppressWarnings("unchecked")
      QueueListener<K, ?> listener = (QueueListener<K, ?>) br.getCacheListener();
      listenerAttrs.put("Create" + i, listener.createList);
      listenerAttrs.put("Update" + i, listener.updateList);
      listenerAttrs.put("Destroy" + i, listener.destroyList);
    }
    return listenerAttrs;
  }
Returns a Map that contains the count for number of cache server and number of Receivers.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java