@Test
public void rulesMustBeTriggeredInTheirNaturalOrder() throws Exception {

    // Given
    when(rule1.evaluate(facts)).thenReturn(true);
    when(rule2.evaluate(facts)).thenReturn(true);
    when(rule2.compareTo(rule1)).thenReturn(1);
    rules.register(rule1);
    rules.register(rule2);
    // When
    rulesEngine.fire(rules, facts);
    // Then
    InOrder inOrder = inOrder(rule1, rule2);
    inOrder.verify(rule1).execute(facts);
    inOrder.verify(rule2).execute(facts);
}