@SuppressWarnings("unchecked")
  private CacheServer createRegionAndStartCacheServer(String[] regions, Cache cache)
      throws IOException {
    RegionAttributesCreation regionAttributes = new RegionAttributesCreation();
    regionAttributes.setEnableBridgeConflation(true);
    regionAttributes.setDataPolicy(DataPolicy.REPLICATE);

    for (String region : regions) {
      cache.createRegionFactory(regionAttributes).create(region);
    }

    CacheServer server = cache.addCacheServer();
    server.setPort(0);
    server.setLoadProbe(CacheServer.DEFAULT_LOAD_PROBE);
    server.start();

    return server;
  }
Dunit Test containing inter - operations between REST Client and Gemfire cache client

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