private void validateServerClientRegionEntries(VM server, VM client, final String regionName) {
    server.invoke(new CacheSerializableRunnable("Server Region Entries") {
      @Override
      public void run2() throws CacheException {
        Region region = getRootRegion().getSubregion(regionName);
        LogWriterUtils.getLogWriter().info("### Entries in Server :" + region.keySet().size());
      }
    });

    client.invoke(new CacheSerializableRunnable("Client Region Entries") {
      @Override
      public void run2() throws CacheException {
        Region region = getRootRegion().getSubregion(regionName);
        LogWriterUtils.getLogWriter().info("### Entries in Client :" + region.keySet().size());
      }
    });
  }
For debug purpose - Compares entries in the region
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java