### Question:
Assert { public static <T> T requireNonNull(@Nullable T t, String message) { if (t == null) { throw new IllegalArgumentException(message); } return t; } private  Assert(); static T requireNonNull(@Nullable T t, String message); static ByteString requireNonEmpty(@Nullable ByteString s, String message); static String requireNonEmpty(@Nullable String s, String message);  }### Answer:
@Test public void assertNotNullThrowsExceptionWhenNull() { assertThatThrownBy(() -> { Assert.requireNonNull(null, "oh no"); }).isInstanceOf(IllegalArgumentException.class) .hasMessage("oh no"); }
@Test public void assertNotNullNoopWhenNotNull() { String value = Assert.requireNonNull("definitely not null", "oh no"); assertThat(value).isEqualTo("definitely not null"); }