@Test
public void testInherit() {

    Attribute attribute = new Attribute(null, (Expression) null, null, (String) null);
    Attribute parentAttribute = new Attribute("value", Expression
            .createExpression("expression", "language"), "role", "renderer");
    attribute.inherit(parentAttribute);
    assertEquals("value", attribute.getValue());
    assertEquals("expression", attribute.getExpressionObject().getExpression());
    assertEquals("language", attribute.getExpressionObject().getLanguage());
    assertEquals("role", attribute.getRole());
    assertEquals("renderer", attribute.getRenderer());
    Expression expression = new Expression(null, "MYLANG");
    attribute = new Attribute(null, expression, null, (String) null);
    attribute.setRoles(new HashSet<String>());
    attribute.inherit(parentAttribute);
    assertEquals("value", attribute.getValue());
    assertEquals("expression", attribute.getExpressionObject().getExpression());
    assertEquals("language", attribute.getExpressionObject().getLanguage());
    assertEquals("role", attribute.getRole());
    assertEquals("renderer", attribute.getRenderer());
}