### Question:
FixedRule extends AbstractRule { @Override public boolean isSatisfied(int index, TradingRecord tradingRecord) { boolean satisfied = false; for (int i = 0; i < indexes.length; i++) { if (indexes[i] == index) { satisfied = true; break; } } traceIsSatisfied(index, satisfied); return satisfied; } FixedRule(int... indexes); @Override boolean isSatisfied(int index, TradingRecord tradingRecord);  }### Answer:
@Test public void isSatisfied() { fixedRule = new FixedRule(); assertFalse(fixedRule.isSatisfied(0)); assertFalse(fixedRule.isSatisfied(1)); assertFalse(fixedRule.isSatisfied(2)); assertFalse(fixedRule.isSatisfied(9)); fixedRule = new FixedRule(1, 2, 3); assertFalse(fixedRule.isSatisfied(0)); assertTrue(fixedRule.isSatisfied(1)); assertTrue(fixedRule.isSatisfied(2)); assertTrue(fixedRule.isSatisfied(3)); assertFalse(fixedRule.isSatisfied(4)); assertFalse(fixedRule.isSatisfied(5)); assertFalse(fixedRule.isSatisfied(6)); assertFalse(fixedRule.isSatisfied(7)); assertFalse(fixedRule.isSatisfied(8)); assertFalse(fixedRule.isSatisfied(9)); assertFalse(fixedRule.isSatisfied(10)); }