JobRecipient extends BaseEntity implements Recipient { @Override public boolean equals(Object obj) { if (!(obj instanceof JobRecipient)) { return false; } JobRecipient o = (JobRecipient) obj; return new EqualsBuilder().append(o.getId(), getId()).isEquals(); } JobRecipient();  JobRecipient(String address, RecipientType type); @Override String getAddress(); void setAddress(String address); @Override RecipientType getType(); void setType(RecipientType type); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testEquals_1() throws Exception { JobRecipient fixture = new JobRecipient("", RecipientType.email); Object obj = new Object(); boolean result = fixture.equals(obj); assertEquals(false, result); }
@Test public void testEquals_2() throws Exception { JobRecipient fixture = new JobRecipient("", RecipientType.email); Object obj = new JobRecipient(); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_3() throws Exception { JobRecipient fixture = new JobRecipient("", RecipientType.email); Object obj = new JobRecipient(); boolean result = fixture.equals(obj); assertEquals(true, result); }