### Question:
Tag extends BaseElement implements IElement, IBaseCoding { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Tag other = (Tag) obj; if (myScheme == null) { if (other.myScheme != null) return false; } else if (!myScheme.equals(other.myScheme)) return false; if (myTerm == null) { if (other.myTerm != null) return false; } else if (!myTerm.equals(other.myTerm)) return false; return true; } Tag(); @Deprecated  Tag(String theTerm);  Tag(String theScheme, String theTerm);  Tag(String theScheme, String theTerm, String theLabel);  Tag(URI theScheme, URI theTerm, String theLabel); String getLabel(); String getScheme(); String getTerm(); @Override boolean equals(Object obj); @Override int hashCode(); @Override boolean isEmpty(); Tag setLabel(String theLabel); Tag setScheme(String theScheme); Tag setTerm(String theTerm); @Override String toString(); @Override String getCode(); @Override String getDisplay(); @Override String getSystem(); @Override IBaseCoding setCode(String theTerm); @Override IBaseCoding setDisplay(String theLabel); @Override IBaseCoding setSystem(String theScheme); static final String ATTR_LABEL; static final String ATTR_SCHEME; static final String ATTR_TERM; static final String HL7_ORG_FHIR_TAG; static final String HL7_ORG_PROFILE_TAG; static final String HL7_ORG_SECURITY_TAG; }### Answer:
@Test public void testEquals() { Tag tag1 = new Tag().setScheme("scheme").setTerm("term").setLabel("label"); Tag tag2 = new Tag().setScheme("scheme").setTerm("term").setLabel("label"); Tag tag3 = new Tag().setScheme("scheme2").setTerm("term").setLabel("label"); Tag tag4 = new Tag().setScheme("scheme").setTerm("term2").setLabel("label"); assertEquals(tag1, tag1); assertEquals(tag1, tag2); assertNotEquals(tag1, tag3); assertNotEquals(tag1, tag4); assertNotEquals(tag1, null); assertNotEquals(tag1, ""); }