### Question:
PersonAttribute extends BaseChangeableOpenmrsData implements java.io.Serializable, Comparable<PersonAttribute> { @Override public String toString() { Object o = getHydratedObject(); if (o instanceof Attributable) { return ((Attributable) o).getDisplayString(); } else if (o != null) { return o.toString(); } return this.value; } PersonAttribute();  PersonAttribute(Integer personAttributeId);  PersonAttribute(PersonAttributeType type, String value); PersonAttribute copy(); @SuppressWarnings("unchecked") boolean equalsContent(PersonAttribute otherAttribute); Person getPerson(); void setPerson(Person person); PersonAttributeType getAttributeType(); void setAttributeType(PersonAttributeType attributeType); String getValue(); void setValue(String value); @Override String toString(); Integer getPersonAttributeId(); void setPersonAttributeId(Integer personAttributeId); @SuppressWarnings("unchecked") Object getHydratedObject(); void voidAttribute(String reason); @Override int compareTo(PersonAttribute other); @Override Integer getId(); @Override void setId(Integer id); static final long serialVersionUID; }### Answer:
@Test public void toString_shouldReturnToStringOfHydratedValue() { PersonAttributeType type = Context.getPersonService().getPersonAttributeType(8); PersonAttribute attr = new PersonAttribute(type, "6"); Assert.assertEquals("MARRIED", attr.toString()); }