private void addCacheListenerOnBucketRegion(String regionName, int numBuckets) {
    PartitionedRegion region = (PartitionedRegion) cache.getRegion(regionName);
    for (int i = 0; i < numBuckets; i++) {
      BucketRegion br = region.getBucketRegion(i);
      @SuppressWarnings("unchecked")
      AttributesMutator<Object, Object> mutator = br.getAttributesMutator();
      listener1 = new QueueListener<>();
      mutator.addCacheListener(listener1);
    }
  }
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