@Test
public void testHashCode() {

    Definition definition = new Definition();
    definition.setName("myDefinition");
    definition.setExtends("myExtends");
    Attribute attribute1 = new Attribute("value1");
    definition.putAttribute("name1", attribute1);
    Attribute attribute2 = new Attribute("value2");
    definition.putAttribute("name2", attribute2);
    BasicAttributeContext attributeContext = new BasicAttributeContext();
    attributeContext.putAttribute("name1", attribute1);
    attributeContext.putAttribute("name2", attribute2);
    assertEquals("myDefinition".hashCode() + "myExtends".hashCode()
            + attributeContext.hashCode(), definition.hashCode());
}