public void asyncClearRegion(VM vm, final String regionName) {
    vm.invokeAsync(new CacheSerializableRunnable("Destroy entries") {
      @Override
      public void run2() throws CacheException {
        LogWriterUtils.getLogWriter().info("### Clearing Region. ###");
        Region region1;
        if (!"root".equals(regionName)) {
          region1 = getRootRegion().getSubregion(regionName);
        } else {
          region1 = getRootRegion();
        }
        region1.clear();
        LogWriterUtils.getLogWriter()
            .info("### Number of Entries in Region :" + region1.keySet().size());
      }
    });
  }
Validates a query result with client region values if region is not null, otherwise verifies
the size only.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java