QueryAttr implements Serializable, Cloneable { @Override public int hashCode() { if (hashCode == 0) { hashCode = new HashCodeBuilder(11, 47).append(name).append(path).append(type).toHashCode(); } return hashCode; } QueryAttr(String path, Class<?> type);  QueryAttr(String name, String path, Class<?> type);  QueryAttr(String name, String path, Class<?> type, String title); String getName(); String getTitle(); String getPath(); Class<?> getType(); void setTitle(String title); @Override QueryAttr clone(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testHashCode() { assertEquals(a1.hashCode(), a1.hashCode()); assertEquals(a1.hashCode(), a1again.hashCode()); assertTrue(a1.hashCode() != a2.hashCode()); }