private PartitionedRegion createPartitionedRegion(final String regionName,
      final PartitionAttributes partitionAttributes) {
    RegionFactory regionFactory = getCache().createRegionFactory(RegionShortcut.PARTITION);
    regionFactory.setPartitionAttributes(partitionAttributes);
    return (PartitionedRegion) regionFactory.create(regionName);
  }
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