Objects { public static boolean equals(Object a, Object b) { return a == b || a != null && a.equals(b); } private  Objects(); static boolean equals(Object a, Object b);  }
@Test public void equalObjectsResultInTrue() { assertThat(Objects.equals("something", "something"), is(true)); }
@Test public void nullAndNullAreEqual() { assertThat(Objects.equals(null, null), is(true)); }
@Test public void twoItemsWhereOneOfThemIsNullResultInFalse() { assertThat(Objects.equals("something", null), is(false)); assertThat(Objects.equals(null, "something"), is(false)); }