protected List<ScenarioResult> getScenarioResultsFromGivenFacts(ScesimModelDescriptor scesimModelDescriptor,
                                                                    List<ScenarioExpect> scenarioOutputsPerFact,
                                                                    InstanceGiven input,
                                                                    ExpressionEvaluatorFactory expressionEvaluatorFactory) {
        Object factInstance = input.getValue();
        List<ScenarioResult> scenarioResults = new ArrayList<>();
        for (ScenarioExpect scenarioExpect : scenarioOutputsPerFact) {
            if (scenarioExpect.isNewFact()) {
                continue;
            }

            for (FactMappingValue expectedResult : scenarioExpect.getExpectedResult()) {

                ExpressionEvaluator expressionEvaluator = expressionEvaluatorFactory.getOrCreate(expectedResult);

                ScenarioResult scenarioResult = fillResult(expectedResult,
                                                           () -> createExtractorFunction(expressionEvaluator, expectedResult, scesimModelDescriptor)
                                                                   .apply(factInstance),
                                                           expressionEvaluator);

                scenarioResults.add(scenarioResult);
            }
        }
        return scenarioResults;
    }
@Test
    public void getScenarioResultsTest() {
        List<InstanceGiven> scenario1Inputs = extractGivenValuesForScenario1();
        List<ScenarioExpect> scenario1Outputs = runnerHelper.extractExpectedValues(scenario1.getUnmodifiableFactMappingValues());

        assertThat(scenario1Inputs).isNotEmpty();

        InstanceGiven input1 = scenario1Inputs.get(0);

        scenario1Outputs = scenario1Outputs.stream().filter(elem -> elem.getFactIdentifier().equals(input1.getFactIdentifier())).collect(toList());
        List<ScenarioResult> scenario1Results = runnerHelper.getScenarioResultsFromGivenFacts(simulation.getScesimModelDescriptor(), scenario1Outputs, input1, expressionEvaluatorFactory);

        assertThat(scenario1Results).hasSize(1);
        assertThat(scenario1Outputs.get(0).getExpectedResult().get(0).getStatus()).isEqualTo(SUCCESS);

        List<InstanceGiven> scenario2Inputs = extractGivenValuesForScenario2();
        List<ScenarioExpect> scenario2Outputs = runnerHelper.extractExpectedValues(scenario2.getUnmodifiableFactMappingValues());

        assertThat(scenario2Inputs).isNotEmpty();

        InstanceGiven input2 = scenario2Inputs.get(0);

        scenario2Outputs = scenario2Outputs.stream().filter(elem -> elem.getFactIdentifier().equals(input2.getFactIdentifier())).collect(toList());
        List<ScenarioResult> scenario2Results = runnerHelper.getScenarioResultsFromGivenFacts(simulation.getScesimModelDescriptor(), scenario2Outputs, input2, expressionEvaluatorFactory);

        assertThat(scenario2Results).hasSize(1);
        assertThat(scenario1Outputs.get(0).getExpectedResult().get(0).getStatus()).isEqualTo(SUCCESS);

        List<ScenarioExpect> newFact = List.of(new ScenarioExpect(personFactIdentifier, List.of(), true));
        List<ScenarioResult> scenario2NoResults = runnerHelper.getScenarioResultsFromGivenFacts(simulation.getScesimModelDescriptor(), newFact, input2, expressionEvaluatorFactory);

        assertThat(scenario2NoResults).hasSize(0);

        Person person = new Person();
        person.setFirstName("ANOTHER STRING");
        InstanceGiven newInput = new InstanceGiven(personFactIdentifier, person);

        List<ScenarioResult> scenario3Results = runnerHelper.getScenarioResultsFromGivenFacts(simulation.getScesimModelDescriptor(), scenario1Outputs, newInput, expressionEvaluatorFactory);
        assertThat(scenario1Outputs.get(0).getExpectedResult().get(0).getStatus()).isEqualTo(FactMappingValueStatus.FAILED_WITH_ERROR);

        assertThat(scenario3Results).hasSize(1);
        assertThat(scenario3Results.get(0).getResultValue().get()).isEqualTo(person.getFirstName());
        assertThat(scenario3Results.get(0).getFactMappingValue().getRawValue()).isEqualTo("NAME");
    }