AttributeKey { @Override public int hashCode() { return hashCode; } AttributeKey(Class<T> attributeType, String attributeName); static AttributeKey<T> createKey(Class<T> attributeType, String attributeName); String getName(); Class<T> getType(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void hashCodeValue() throws Exception { AttributeKey<Number> key1 = new AttributeKey<Number>(Number.class, "keyName"); AttributeKey<Number> key2 = new AttributeKey<Number>(Number.class, "keyName"); assertThat(key1.hashCode(), is(key2.hashCode())); }