### Question:
Equals { public static boolean safeEquals(final Object obj1, final Object obj2) { return obj1 == null ? obj2 == null : obj1.equals(obj2); }  static boolean safeEquals(final Object obj1, final Object obj2); static boolean isNullOrBlank(final String s); static boolean safeTrimmedStringEquals(final String s1, final String s2);  }### Answer:
@Test public void shouldBeSafeEquals_withObjectsThatAreEqual() { final String obj1 = Randoms.randomString(10); final String obj2 = new String(obj1); assertTrue(Equals.safeEquals(obj1, obj2)); }
@Test public void shouldBeSafeEquals_withNullObjects() { assertTrue(Equals.safeEquals(null, null)); }
@Test public void shouldNotBeSafeEquals_withOneNullObject() { final String obj1 = Randoms.randomString(10); assertFalse(Equals.safeEquals(obj1, null)); assertFalse(Equals.safeEquals(null, obj1)); }
@Test public void shouldNotBeSafeEquals_withObjectsThatAreNotEqual() { final String string1 = Randoms.randomString(5); final String string2 = Randoms.randomString(10); final Integer int1 = Randoms.randomInt(10); assertFalse(Equals.safeEquals(string1, string2)); assertFalse(Equals.safeEquals(int1, string1)); }