@Test
  public void testHashIndexWithLimitQueryForLocalRegion() throws Exception {
    createLocalRegion("portfolios");
    int numEntries = 200;
    int numIds = 100;
    for (int i = 0; i < numEntries; i++) {
      Portfolio p = new Portfolio(i % (numIds));
      p.shortID = (short) i;
      region.put("" + i, p);
    }
    helpTestHashIndexForQuery(
        "SELECT * FROM " + SEPARATOR + "portfolios.entries p WHERE p.key = '1' limit 3",
        "p.key", SEPARATOR + "portfolios.entries p");
  }
Tests that hash index is used and that it returns the correct result for local region
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java