private void createPersistentPR(final String regionName, final int localMaxMemory,
      final boolean isPersistent) {
    Cache cache = getCache();

    RegionFactory regionFactory = cache.createRegionFactory(RegionShortcut.PARTITION);

    if (isPersistent) {
      regionFactory.setDataPolicy(DataPolicy.PERSISTENT_PARTITION);
    } else {
      regionFactory.setDataPolicy(DataPolicy.PARTITION);
    }

    PartitionAttributesFactory partitionAttributesFactory = new PartitionAttributesFactory();
    partitionAttributesFactory.setLocalMaxMemory(localMaxMemory);
    regionFactory.setPartitionAttributes(partitionAttributesFactory.create());

    Region region = regionFactory.create(regionName);

    assertThat(region).isNotNull();
    assertThat(region.isDestroyed()).isFalse();
    assertThat(cache.getRegion(regionName)).isNotNull();
  }
This tests persistence conflicts btw members of partition region
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionCreationDUnitTest.java