DataenumUtils { @Nonnull public static <T> T checkNotNull(T value) { if (value == null) { throw new NullPointerException(); } return value; } private  DataenumUtils(); @Nonnull static T checkNotNull(T value); static boolean equal(@Nullable Object a, @Nullable Object b);  }
@Test public void checkNotNullShouldThrowForNull() throws Exception { thrown.expect(NullPointerException.class); DataenumUtils.checkNotNull(null); }
@Test public void checkNotNullShouldReturnInputOnNonNull() throws Exception { Object expected = new Object(); assertThat(DataenumUtils.checkNotNull(expected), is(expected)); }