private void helpTestRemoveAndNotEqualsQuery() throws Exception {
    int numEntries = 200;
    index = qs.createHashIndex("idHash", "p.ID", SEPARATOR + "portfolios p");
    for (int i = 0; i < numEntries; i++) {
      Portfolio p = new Portfolio(i);
      p.shortID = (short) i;
      region.put("" + i, p);
    }

    region.destroy("1");

    SelectResults results =
        (SelectResults) qs.newQuery("Select * FROM " + SEPARATOR + "portfolios p where p.ID != 1")
            .execute();
    assertEquals(numEntries - 1, 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