### Question:
Appraiser { @Override public final boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof Appraiser)) { return false; } Appraiser other = (Appraiser) obj; return name.equals(other.name); } Appraiser(final String name); protected  Appraiser(); final Long getId(); String getName(); final void setName(final String name); @Override final int hashCode(); @Override final boolean equals(final Object obj); @Override final String toString();  }### Answer:
@Test public void testEqualsNull() { final String name = "Test Appraiser"; final Appraiser appraiser = new TestAppraiser(name); Assert.assertFalse(appraiser.equals(null)); }
@Test public void testEqualsReflexive() { final String name = "Test Appraiser"; final Appraiser appraiser = new TestAppraiser(name); Assert.assertTrue(appraiser.equals(appraiser)); }
@Test public void testEqualsSymmetric() { final String name = "Test Appraiser"; final Appraiser appraiser1 = new TestAppraiser(name); final Appraiser appraiser2 = new TestAppraiser(name); Assert.assertTrue(appraiser1.equals(appraiser2)); Assert.assertTrue(appraiser2.equals(appraiser1)); }
@Test public void testEqualsTransitive() { final String name = "Test Appraiser"; final Appraiser appraiser1 = new TestAppraiser(name); final Appraiser appraiser2 = new TestAppraiser(name); final Appraiser appraiser3 = new TestAppraiser(name); Assert.assertTrue(appraiser1.equals(appraiser2)); Assert.assertTrue(appraiser2.equals(appraiser3)); Assert.assertTrue(appraiser1.equals(appraiser3)); }
@Test public void testNotEquals() { final String name1 = "Test Appraiser"; final String name2 = "Other Appraiser"; final Appraiser appraiser1 = new TestAppraiser(name1); final Appraiser appraiser2 = new TestAppraiser(name2); Assert.assertFalse(appraiser1.equals(appraiser2)); Assert.assertFalse(appraiser2.equals(appraiser1)); }