@Test public void testToString() { Definition definition = new Definition(); definition.setName("myDefinitionName"); assertEquals( "{name=myDefinitionName, template=<null>, role=<null>, preparerInstance=null, attributes=null}", definition.toString()); definition.setTemplateAttribute(Attribute.createTemplateAttribute("myTemplate")); assertEquals( "{name=myDefinitionName, template=myTemplate, role=null, preparerInstance=null, attributes=null}", definition.toString()); definition.putAttribute("myAttributeName", new Attribute("myAttributeValue")); assertEquals( "{name=myDefinitionName, template=myTemplate, role=null, preparerInstance=null, " + "attributes={myAttributeName=myAttributeValue}}", definition.toString()); }
@Override public String toString() { return "{name=" + name + ", template=" + (templateAttribute != null ? templateAttribute.getValue() : "<null>") + ", role=" + (templateAttribute != null ? templateAttribute.getRoles() : "<null>") + ", preparerInstance=" + preparer + ", attributes=" + attributes + "}"; }
Definition extends BasicAttributeContext { @Override public String toString() { return "{name=" + name + ", template=" + (templateAttribute != null ? templateAttribute.getValue() : "<null>") + ", role=" + (templateAttribute != null ? templateAttribute.getRoles() : "<null>") + ", preparerInstance=" + preparer + ", attributes=" + attributes + "}"; } }
Definition extends BasicAttributeContext { @Override public String toString() { return "{name=" + name + ", template=" + (templateAttribute != null ? templateAttribute.getValue() : "<null>") + ", role=" + (templateAttribute != null ? templateAttribute.getRoles() : "<null>") + ", preparerInstance=" + preparer + ", attributes=" + attributes + "}"; } Definition();  Definition(Definition definition);  Definition(String name, Attribute templateAttribute,
                               Map<String, Attribute> attributes); }
Definition extends BasicAttributeContext { @Override public String toString() { return "{name=" + name + ", template=" + (templateAttribute != null ? templateAttribute.getValue() : "<null>") + ", role=" + (templateAttribute != null ? templateAttribute.getRoles() : "<null>") + ", preparerInstance=" + preparer + ", attributes=" + attributes + "}"; } Definition();  Definition(Definition definition);  Definition(String name, Attribute templateAttribute,
                               Map<String, Attribute> attributes); String getName(); void setName(String aName); void setExtends(String name); String getExtends(); @Override boolean equals(Object obj); @Override int hashCode(); boolean isExtending(); @Override String toString(); }
Definition extends BasicAttributeContext { @Override public String toString() { return "{name=" + name + ", template=" + (templateAttribute != null ? templateAttribute.getValue() : "<null>") + ", role=" + (templateAttribute != null ? templateAttribute.getRoles() : "<null>") + ", preparerInstance=" + preparer + ", attributes=" + attributes + "}"; } Definition();  Definition(Definition definition);  Definition(String name, Attribute templateAttribute,
                               Map<String, Attribute> attributes); String getName(); void setName(String aName); void setExtends(String name); String getExtends(); @Override boolean equals(Object obj); @Override int hashCode(); boolean isExtending(); @Override String toString();  }