private void createPartitionedRegion(final int localMaxMemory) {
    PartitionAttributesFactory paf = new PartitionAttributesFactory();
    paf.setRedundantCopies(1);
    paf.setLocalMaxMemory(localMaxMemory);
    paf.setTotalNumBuckets(TOTAL_NUMBER_OF_BUCKETS);

    RegionFactory regionFactory = getCache().createRegionFactory(RegionShortcut.PARTITION);
    regionFactory.setPartitionAttributes(paf.create());

    regionFactory.create(REGION_NAME);
  }
Regression test for TRAC #39868

<p>
TRAC #39868: PartitionMemberDetails.getSize() reports negative PR sizes when redundancy is 0
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PartitionedRegionSizeDUnitTest.java