Asserts { public static void check(final boolean expression, final String message) { if (!expression) { throw new IllegalStateException(message); } } private  Asserts(); static void check(final boolean expression, final String message); static void check(final boolean expression, final String message, final Object... args); static void check(final boolean expression, final String message, final Object arg); static void notNull(final Object object, final String name); static void notEmpty(final CharSequence s, final String name); static void notBlank(final CharSequence s, final String name);  }
@Test public void testExpressionCheckPass() { Asserts.check(true, "All is well"); }
@Test(expected=IllegalStateException.class) public void testExpressionCheckFail() { Asserts.check(false, "Oopsie"); }