private int createCache(DataPolicy dataPolicy) throws IOException {
    cacheRule.createCache();

    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setDataPolicy(dataPolicy);

    cacheRule.getCache().createRegion(REGION_NAME, factory.create());

    CacheServer server1 = cacheRule.getCache().addCacheServer();
    server1.setPort(0);
    server1.setNotifyBySubscription(true);
    server1.start();
    return server1.getPort();
  }
Verifies that clear operation count matches with stats count with persistence
geode-core/src/distributedTest/java/org/apache/geode/cache/RegionClearStatsDistributedTest.java