@Test
public void testClone() {

    Expression expression = new Expression("my.expression", "MYLANG");
    Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer");
    attribute = attribute.clone();
    assertEquals("my.value", attribute.getValue());
    assertEquals("myrenderer", attribute.getRenderer());
    Set<String> roles = new HashSet<String>();
    roles.add("role1");
    roles.add("role2");
    assertEquals(roles, attribute.getRoles());
    assertEquals("my.expression", attribute.getExpressionObject().getExpression());
    assertEquals("MYLANG", attribute.getExpressionObject().getLanguage());
}