private PartitionAttributes createPartitionAttributes(final int localMaxMemory,
      final int redundancy, final long startupRecoveryDelay, final int totalNumBuckets) {
    PartitionAttributesFactory paf = new PartitionAttributesFactory();
    paf.setLocalMaxMemory(localMaxMemory);
    paf.setRedundantCopies(redundancy);
    paf.setStartupRecoveryDelay(startupRecoveryDelay);
    paf.setTotalNumBuckets(totalNumBuckets);
    return paf.create();
  }
TODO: extract to IntegrationTest with RegressionTest suffix
<p>
TODO: this test has nothing to do with PartitionedRegions. Move it to a FunctionService test
<p>
TRAC #41832: Function execution should throw Exceptions when any configuration is not valid
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/PRFunctionExecutionWithResultSenderDUnitTest.java