@Override
  protected Region<String, Integer> createRegion(final String name,
      final CacheListener<String, Integer> listener) {
    PartitionAttributesFactory<String, Integer> paf = new PartitionAttributesFactory<>();
    paf.setRedundantCopies(redundancy);

    RegionFactory<String, Integer> regionFactory = cacheRule.getCache().createRegionFactory();
    regionFactory.addCacheListener(listener);
    regionFactory.setDataPolicy(DataPolicy.PARTITION);
    regionFactory.setPartitionAttributes(paf.create());

    return regionFactory.create(name);
  }
This class tests event triggering and handling in partitioned regions.

<p>
Converted from JUnit 3.

@since GemFire 5.1
geode-core/src/distributedTest/java/org/apache/geode/cache/PRCacheListenerDistributedTest.java