@Override
    public int compareTo(Object o) {
      if (o instanceof Identifier) {
        String otherId = ((Identifier) o).id;
        return id.compareTo(otherId);
      }
      throw new ClassCastException("Unable to cast " + o + " to Identifier");
    }
test remove and not equals Query
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/HashIndexQueryIntegrationTest.java