### Question:
Attribute extends Feature { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id: " + getId()).append(", "); sb.append("name: " + getName()); sb.append(", "); sb.append("type: " + getType()); sb.append(", "); sb.append("multiplicity: " + getMultiplicity()); if (!getTaggedValues().isEmpty()) { sb.append(", "); sb.append("taggedValues: " + getTaggedValues()); } sb.append("}"); return sb.toString(); } Attribute(final Identifier id, final String name, final Identifier type, final Multiplicity multiplicity,
            final List<TaggedValue> taggedValues); @Override void accept(final Visitor visitor); @Override boolean isAssociationEnd(); @Override boolean isAttribute(); @Override String toString();  }### Answer:
@Test public void testToString() { String string1 = attribute.toString(); String string2 = "{id: " + identifier.toString() + ", name: TestAttribute, type: " + identifier + ", multiplicity: " + TestUtils.ZERO_TO_ONE + "}"; assertEquals(string1, string2); }