private void createPeer(DataPolicy policy) {
    Region<Object, Object> region = CacheFactory.getAnyInstance()
        .createRegionFactory()
        .setDataPolicy(policy)
        .setScope(Scope.DISTRIBUTED_ACK)
        .create(REPLICATE_REGION_NAME);

    assertThat(region).isNotNull();
  }
Dunit Test to validate OnRegion function execution with REST APIs

@since GemFire 8.0
geode-assembly/src/distributedTest/java/org/apache/geode/rest/internal/web/controllers/RestAPIOnRegionFunctionExecutionDUnitTest.java