private void helpTestUpdatesOnKeyWithSameHash() throws Exception {
    int numEntries = 10;
    for (int i = 0; i < numEntries; i++) {
      SameHashObject p = new SameHashObject(5, i);
      region.put("" + i, p);
    }
    region.put("0", new SameHashObject(100, 100));
    SelectResults noIndexResults =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 5")
            .execute();
    region.clear();

    HashIndex index = (HashIndex) qs.createHashIndex("idHash", "p.ID", SEPARATOR + "portfolios p");
    for (int i = 0; i < numEntries; i++) {
      SameHashObject p = new SameHashObject(5, i);
      region.put("" + i, p);
    }
    region.put("0",
        new SameHashObject(index.entriesSet.hashIndexSetProperties.set.length + 5, 100));

    SelectResults results =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID = 5")
            .execute();

    assertTrue(results.size() > 0);
    assertEquals(noIndexResults.size(), results.size());
    assertTrue(observer.indexUsed);
  }
test remove and not equals Query
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java