Assert { public static void notNull(Object value, String comment, Object... params) { isTrue(value != null, comment, params); } private  Assert(); static void notNull(Object value, String comment, Object... params); static void hasLength(CharSequence value, String comment, Object... params); static void isTrue(boolean flag, String comment, Object... params); static void state(boolean flag, String comment, Object... params); static String message(String message, Object... params);  }
@Test public void notNullWithDummyValues() { notNull(Integer.valueOf(42), "Test comment"); assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() { notNull(null, "Instance <%s> is empty", null); } }).isInstanceOf(IllegalArgumentException.class).hasMessage("Instance <null> is empty"); assertThatThrownBy(new ThrowableAssert.ThrowingCallable() { @Override public void call() { notNull(null, "Instance <%s> is empty because of <%s>", null, null); } }).isInstanceOf(IllegalArgumentException.class).hasMessage("Instance <null> is empty because of <null>"); }