ListAttribute extends Attribute { @Override public int hashCode() { return super.hashCode() + Boolean.valueOf(inherit).hashCode(); } ListAttribute();  ListAttribute(List<Attribute> value);  ListAttribute(ListAttribute toCopy); void setValue(List<Attribute> attributes); @SuppressWarnings("unchecked") @Override List<Attribute> getValue(); void add(Attribute element); void setInherit(boolean inherit); boolean isInherit(); @SuppressWarnings("unchecked") void inherit(ListAttribute parent); @Override boolean equals(Object obj); @Override int hashCode(); @Override ListAttribute clone();  }
@Test public void testHashCode() { ListAttribute attribute = new ListAttribute(); List<Attribute> list = new ArrayList<Attribute>(); list.add(new Attribute("value1")); list.add(new Attribute("value2")); attribute.setValue(list); attribute.setInherit(true); assertEquals(list.hashCode() + Boolean.TRUE.hashCode(), attribute.hashCode()); }