@Test
public void shouldExecuteEachRuleInSequence() {

    optimizer.optimize(context, node);
    for (int i = 0; i != rules.size(); ++i) {
        assertThat(ruleExecutionOrder.get(i), is(i));
    }
}