private Object getValue(ScenarioStateField field) {
        if (field.getResolution() == Resolution.NAME) {
            return state.getValueByName(field.getField().getName());
        }

        return state.getValueByType(field.getField().getType());
    }
@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