@Override
    public void hook(int spot) throws RuntimeException {
      if (spot != 3) {
        return;
      }
      for (Object mapEntryObject : queryEvaluator.getResultsPerMember().entrySet()) {
        Map.Entry<Object, Collection<Collection<Object>>> mapEntry = (Map.Entry) mapEntryObject;
        Collection<Collection<Object>> allResults = mapEntry.getValue();
        for (Collection<Object> results : allResults) {
          if (resultsPerMember.containsKey(mapEntry.getKey())) {
            resultsPerMember.put(mapEntry.getKey(),
                results.size() + resultsPerMember.get(mapEntry.getKey()));
          } else {
            resultsPerMember.put(mapEntry.getKey(), results.size());
          }
        }
      }
    }
Test hook that collates all results per member.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRQueryDUnitTest.java