private void helpTestHashIndexRemove() throws Exception {
    createData(region, 200);
    region.destroy("1");
    SelectResults noIndexResults =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 1")
            .execute();

    region.clear();
    createData(region, 200);
    region.destroy("1");
    index = qs.createHashIndex("idHash", "p.ID", SEPARATOR + "portfolios p");
    SelectResults results =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 1")
            .execute();
    assertEquals(noIndexResults.size(), results.size());
    assertTrue(observer.indexUsed);
  }
Tests that hash index is used and that the value is correctly removed from the index where only
1 value is using the key for partitioned regions
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java