@Test public void checkNotNull_throwsNullPointerException_whenNull() { thrown.expect(NullPointerException.class); Preconditions.checkNotNull(null); }
public static <T> T checkNotNull(final T reference) { if (reference == null) { throw new NullPointerException(); } return reference; }
Preconditions { public static <T> T checkNotNull(final T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } }
Preconditions { public static <T> T checkNotNull(final T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } private  Preconditions(); }
Preconditions { public static <T> T checkNotNull(final T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } private  Preconditions(); @NonNull static T get(@Nullable final T reference); static T checkNotNull(final T reference); static T checkNotNull(final T reference, @NonNull final String errorMessage); }
Preconditions { public static <T> T checkNotNull(final T reference) { if (reference == null) { throw new NullPointerException(); } return reference; } private  Preconditions(); @NonNull static T get(@Nullable final T reference); static T checkNotNull(final T reference); static T checkNotNull(final T reference, @NonNull final String errorMessage);  }