@Override
  public void hook(int spot) throws RuntimeException {

    QueryObserver observer = QueryObserverHolder.getInstance();
    assertTrue(observer instanceof IndexTrackingQueryObserver);
    IndexTrackingQueryObserver gfObserver = (IndexTrackingQueryObserver) observer;

    if (spot == 1) { // before index lookup
    } else if (spot == 2) { // before key range index lookup
    } else if (spot == 3) { // End of afterIndexLookup call
    } else if (spot == 4) { // Before resetting indexInfoMap
      Map map = gfObserver.getUsedIndexes();
      assertEquals(1, map.size());

      assertTrue(map.get(
          INDEX_NAME) instanceof IndexTrackingQueryObserver.IndexInfo);
      rMap = (IndexTrackingQueryObserver.IndexInfo) map.get(
          INDEX_NAME);

      if (regn instanceof PartitionedRegion) {
        assertEquals(1, rMap.getResults().size());
      } else if (regn instanceof LocalRegion) {
        assertEquals(1, rMap.getResults().size());
      }
    }
  }
TODO: Not implemented fully for all the hooks.
geode-dunit/src/main/java/org/apache/geode/cache/query/internal/index/IndexTrackingTestHook.java