### Question:
Assert { static void condition(boolean condition, String expression) throws RuleException { if (!condition) { throw new RuleException(MessageFormat.format("Expected condition ''{0}'' to be satisfied.", expression)); } } private  Assert();   }### Answer:
@Test public void testCondition_pass() throws RuleException { Assert.condition(true, "don't care"); }
@Test public void testCondition_fail() throws RuleException { try { Assert.condition(false, "must fail"); fail("RuleException expected"); } catch (RuleException expected) { assertEquals("Expected condition 'must fail' to be satisfied.", expected.getMessage()); } }