QueryBindingSet extends AbstractBindingSet { @Override public boolean equals(Object other) { if (other instanceof QueryBindingSet) { return bindings.equals(((QueryBindingSet) other).bindings); } else { return super.equals(other); } } QueryBindingSet();  QueryBindingSet(int capacity);  QueryBindingSet(BindingSet bindingSet); void addAll(BindingSet bindingSet); void addBinding(Binding binding); void addBinding(String name, Value value); void setBinding(Binding binding); void setBinding(String name, Value value); void removeBinding(String name); void removeAll(Collection<String> bindingNames); void retainAll(Collection<String> bindingNames); @Override Set<String> getBindingNames(); @Override Value getValue(String bindingName); @Override Binding getBinding(String bindingName); @Override boolean hasBinding(String bindingName); @Override Iterator<Binding> iterator(); @Override int size(); @Override boolean equals(Object other);  }
@Test public void testHashcodeMapBindingSet() { assertTrue(qbs.equals(mbs)); assertTrue(mbs.equals(qbs)); assertEquals("objects that return true on their equals() method must have identical hash codes", qbs.hashCode(), mbs.hashCode()); }