### Question:
MessageReference { @Override public boolean equals(Object o) { if (!(o instanceof MessageReference)) { return false; } MessageReference other = (MessageReference) o; return equals(other.accountUuid, other.folderId, other.uid); } MessageReference(String accountUuid, String folderId, String uid, Flag flag); @Nullable static MessageReference parse(String identity); String toIdentityString(); @Override boolean equals(Object o); boolean equals(String accountUuid, String folderId, String uid); @Override int hashCode(); @Override String toString(); String getAccountUuid(); String getFolderId(); String getUid(); Flag getFlag(); MessageReference withModifiedUid(String newUid); MessageReference withModifiedFlag(Flag newFlag);  }### Answer:
@Test public void equalsWithAnObjectShouldReturnFalse() { MessageReference messageReference = new MessageReference("a", "b", "c", null); Object object = new Object(); assertFalse(messageReference.equals(object)); }
@SuppressWarnings("ObjectEqualsNull") @Test public void equalsWithNullShouldReturnFalse() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); assertFalse(messageReference.equals(null)); }
@Test public void equalsWithSameMessageReferenceShouldReturnTrue() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); assertTrue(messageReference.equals(messageReference)); }
@Test public void alternativeEquals() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); boolean equalsResult = messageReference.equals("account", "folder", "uid"); assertTrue(equalsResult); }
@Test public void equals_withNullAccount_shouldReturnFalse() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); boolean equalsResult = messageReference.equals(null, "folder", "uid"); assertFalse(equalsResult); }
@Test public void equals_withNullFolder_shouldReturnFalse() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); boolean equalsResult = messageReference.equals("account", null, "uid"); assertFalse(equalsResult); }
@Test public void equals_withNullUid_shouldReturnFalse() { MessageReference messageReference = createMessageReference("account", "folder", "uid"); boolean equalsResult = messageReference.equals("account", "folder", null); assertFalse(equalsResult); }