private void helpTestHashIndexNotUsedInRangeQuery() throws Exception {
    SelectResults results =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID < 2")
            .execute();
    assertFalse(observer.indexUsed);
  }
Tests that hash index is used and that it returns the correct result
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java