@Test
  public void testHashCollisionAndProbe() throws Exception {
    createReplicatedRegion("relationships");
    int numEntries = 40000;
    int numIds = 200;
    for (int i = 0; i < numEntries; i++) {
      int ki = i % numIds;
      Object key = new RelationshipKey(ki, i);
      Object value = new Schema(new Relationship(new RelationshipKey(ki, i)));
      region.put(key, value);
    }
    Object[] params = new Object[2];
    params[0] = new Identifier("Customer" + 1);
    params[1] = new Identifier("Customer" + 1);
    String query = "select * from " + SEPARATOR
        + "relationships.keySet k where k.leftKey = $1 OR k.rightKey = $2";
    SelectResults nonIndexedResults = (SelectResults) qs.newQuery(query).execute(params);
    assertFalse(observer.indexUsed);

    index = qs.createHashIndex("leftKey", "k.leftKey", SEPARATOR + "relationships.keySet k");
    Index index2 =
        qs.createHashIndex("rightKey", "k.rightKey", SEPARATOR + "relationships.keySet k");
    Index index3 = qs.createKeyIndex("keyIndex", "r.key", SEPARATOR + "relationships r");
    SelectResults indexedResults = (SelectResults) qs.newQuery(query).execute(params);
    assertEquals(nonIndexedResults.size(), indexedResults.size());
    assertEquals(nonIndexedResults.size(), numEntries / numIds);
    assertTrue(observer.indexUsed);
  }
test remove and not equals Query
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java