@Test
public void createExtractorFunctionTest() {

    String personName = "Test";
    FactMappingValue factMappingValue = new FactMappingValue(personFactIdentifier, firstNameGivenExpressionIdentifier, personName);
    Function<Object, ValueWrapper> extractorFunction = runnerHelper.createExtractorFunction(expressionEvaluator, factMappingValue, simulation.getScesimModelDescriptor());
    Person person = new Person();
    person.setFirstName(personName);
    assertTrue(extractorFunction.apply(person).isValid());
    person.setFirstName("OtherString");
    assertFalse(extractorFunction.apply(person).isValid());
    Function<Object, ValueWrapper> extractorFunction1 = runnerHelper.createExtractorFunction(expressionEvaluator,
                                                                                              new FactMappingValue(personFactIdentifier,
                                                                                                                   firstNameGivenExpressionIdentifier,
                                                                                                                   null),
                                                                                              simulation.getScesimModelDescriptor());
    ValueWrapper nullValue = extractorFunction1.apply(new Person());
    assertTrue(nullValue.isValid());
    assertNull(nullValue.getValue());
}