### Question:
Preconditions { @NonNull public static <T> T get(@Nullable final T reference) { if (reference == null) { throw new NullPointerException("Assertion for a nonnull object failed."); } 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);  }### Answer:
@Test public void get_returnsParameter_whenNonNull() { Object obj = new Object(); assertThat(Preconditions.get(obj)).isEqualTo(obj); }
@Test public void get_throwsNullPointerException_whenNull() { thrown.expect(NullPointerException.class); Preconditions.get(null); }