### Question:
BooleanRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { traceIsSatisfied(index, satisfied); return satisfied; } BooleanRule(boolean satisfied); @Override boolean isSatisfied(int index, TradingRecord tradingRecord); static final BooleanRule TRUE; static final BooleanRule FALSE; }### Answer:
@Test public void isSatisfied() { assertTrue(satisfiedRule.isSatisfied(0)); assertTrue(satisfiedRule.isSatisfied(1)); assertTrue(satisfiedRule.isSatisfied(2)); assertTrue(satisfiedRule.isSatisfied(10)); assertFalse(unsatisfiedRule.isSatisfied(0)); assertFalse(unsatisfiedRule.isSatisfied(1)); assertFalse(unsatisfiedRule.isSatisfied(2)); assertFalse(unsatisfiedRule.isSatisfied(10)); }