@Test
public void generateCommands() {

    FactMappingValue emptyFMV = new FactMappingValue(FactIdentifier.EMPTY, ExpressionIdentifier.DESCRIPTION, null);
    RuleStatelessScenarioExecutableBuilder builder = new RuleStatelessScenarioExecutableBuilder(null, null);
    Command<ExecutionResults> batchCommand = builder.generateCommands(null);
    assertTrue(verifyCommand(batchCommand, AddCoverageListenerCommand.class));
    assertTrue(verifyCommand(batchCommand, FireAllRulesCommand.class));
    assertFalse(verifyCommand(batchCommand, AgendaGroupSetFocusCommand.class));
    assertFalse(verifyCommand(batchCommand, InsertElementsCommand.class));
    assertFalse(verifyCommand(batchCommand, ValidateFactCommand.class));
    builder.setActiveAgendaGroup("test");
    batchCommand = builder.generateCommands(null);
    assertTrue(verifyCommand(batchCommand, AddCoverageListenerCommand.class));
    assertTrue(verifyCommand(batchCommand, FireAllRulesCommand.class));
    assertTrue(verifyCommand(batchCommand, AgendaGroupSetFocusCommand.class));
    assertFalse(verifyCommand(batchCommand, InsertElementsCommand.class));
    assertFalse(verifyCommand(batchCommand, ValidateFactCommand.class));
    builder.insert(new Object());
    batchCommand = builder.generateCommands(null);
    assertTrue(verifyCommand(batchCommand, AddCoverageListenerCommand.class));
    assertTrue(verifyCommand(batchCommand, FireAllRulesCommand.class));
    assertTrue(verifyCommand(batchCommand, AgendaGroupSetFocusCommand.class));
    assertTrue(verifyCommand(batchCommand, InsertElementsCommand.class));
    assertFalse(verifyCommand(batchCommand, ValidateFactCommand.class));
    builder.addInternalCondition(String.class, obj -> null, new ScenarioResult(emptyFMV, null));
    batchCommand = builder.generateCommands(null);
    assertTrue(verifyCommand(batchCommand, AddCoverageListenerCommand.class));
    assertTrue(verifyCommand(batchCommand, FireAllRulesCommand.class));
    assertTrue(verifyCommand(batchCommand, AgendaGroupSetFocusCommand.class));
    assertTrue(verifyCommand(batchCommand, InsertElementsCommand.class));
    assertTrue(verifyCommand(batchCommand, ValidateFactCommand.class));
}