private void updateValue(ScenarioStateField field, Object value) {
        if (field.getResolution() == Resolution.NAME) {
            state.updateValueByName(field.getField().getName(), value);
        } else {
            state.updateValueByType(field.getField().getType(), value);
        }
    }
@throws JGivenMissingRequiredScenarioStateException in case a field requires
                                                    a value and the value is not present
jgiven-core/src/main/java/com/tngtech/jgiven/impl/inject/ValueInjector.java