DataenumUtils { public static boolean equal(@Nullable Object a, @Nullable Object b) { return a == b || (a != null && a.equals(b)); } private  DataenumUtils(); @Nonnull static T checkNotNull(T value); static boolean equal(@Nullable Object a, @Nullable Object b);  }
@Test public void equalsShouldSupportReferenceIdentity() throws Exception { Object o = new Object(); assertThat(DataenumUtils.equal(o, o), is(true)); }
@Test public void equalsShouldSupportNulls() throws Exception { assertThat(DataenumUtils.equal(null, new Object()), is(false)); assertThat(DataenumUtils.equal(new Object(), null), is(false)); assertThat(DataenumUtils.equal(null, null), is(true)); }
@Test public void equalsShouldFallbackToEquals() throws Exception { List<Integer> one = Collections.singletonList(1); List<Integer> two = Collections.singletonList(1); assertThat(DataenumUtils.equal(one, two), is(true)); }