### Question:
BooleanIndicatorRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { final boolean satisfied = indicator.getValue(index); traceIsSatisfied(index, satisfied); return satisfied; } BooleanIndicatorRule(Indicator<Boolean> indicator); @Override boolean isSatisfied(int index, TradingRecord tradingRecord);  }### Answer:
@Test public void isSatisfied() { assertTrue(rule.isSatisfied(0)); assertTrue(rule.isSatisfied(1)); assertFalse(rule.isSatisfied(2)); assertFalse(rule.isSatisfied(3)); assertTrue(rule.isSatisfied(4)); }