ValidationUtils { public static <T> T notNull(@Nullable T value) { return notNull(value, "Object cannot be null"); } private  ValidationUtils(); static T notNull(@Nullable T value); static T notNull(@Nullable T value, String message);  }
@Test void notNull__null_argument_throws_exception() { Assertions.assertThrows( IllegalArgumentException.class, () -> ValidationUtils.notNull(null) ); }
@Test void notNull__non_null_argument_returns_argument() { String actual = ValidationUtils.notNull("testValue"); Assertions.assertEquals("testValue", actual); }