### Question:
LSMessageDigest { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } LSMessageDigest other = (LSMessageDigest) obj; return Arrays.equals(bytes, other.bytes); } LSMessageDigest(final byte[] bytes); final byte[] getBytes(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); static final String toString(LSMessageDigest messageDigest);  }### Answer:
@Test public void testEqualsSameObjectEmpty() { final LSMessageDigest md1 = createMessageDigestEmpty(); Assert.assertTrue("message digest", md1.equals(md1)); }
@Test public void testEqualsDifferentObjectsEmpty() { final LSMessageDigest md1 = createMessageDigestEmpty(); final LSMessageDigest md2 = createMessageDigestEmpty(); Assert.assertTrue("message digest", md1.equals(md2)); }
@Test public void testEqualsDifferentTypes() { final LSMessageDigest md1 = createMessageDigestA(); final Object md2 = new Object(); Assert.assertFalse("message digest", md1.equals(md2)); Assert.assertFalse("message digest", md2.equals(md1)); }
@Test public void testEqualsNull() { final LSMessageDigest md1 = createMessageDigestA(); final Object md2 = null; Assert.assertFalse("message digest", md1.equals(md2)); }
@Test public void testEqualsDifferentObjectsDifferentContent() { final LSMessageDigest md1 = createMessageDigestA(); final LSMessageDigest md2 = createMessageDigestB(); Assert.assertFalse("message digest", md1.equals(md2)); }
@Test public void testEqualsDifferentObjectsSameContent() { final LSMessageDigest md1 = createMessageDigestA(); final LSMessageDigest md2 = createMessageDigestA(); Assert.assertTrue("message digest", md1.equals(md2)); }