Attribute implements Serializable, Cloneable { @Override public String toString() { if (value != null) { return value.toString(); } return null; } Attribute();  Attribute(Object value);  Attribute(Attribute attribute);  Attribute(Object value, String role);  Attribute(Object value, Expression expression, String role, String rendererName); static Attribute createTemplateAttribute(String template); static Attribute createTemplateAttribute(String template,
            String templateExpression, String templateType, String role); static Attribute createTemplateAttributeWithExpression(
            String templateExpression); String getRole(); Set<String> getRoles(); void setRole(String role); void setRoles(Set<String> roles); Object getValue(); void setValue(Object value); Expression getExpressionObject(); void setExpressionObject(Expression expressionObject); @Override String toString(); String getRenderer(); void setRenderer(String rendererName); void inherit(Attribute attribute); @Override boolean equals(Object obj); boolean isPermitted(Request request); @Override int hashCode(); @Override Attribute clone();  }
@Test public void testToString() { Expression expression = new Expression("my.expression", "MYLANG"); Attribute attribute = new Attribute("my.value", expression, "role1,role2", "myrenderer"); Set<String> roles = new HashSet<String>(); roles.add("role1"); roles.add("role2"); assertEquals("my.value", attribute.toString()); attribute.setValue(null); assertNull(attribute.toString()); }