static final String addFunctionParameter(ParameterDescriptor descriptor, RuleBuilderStep step) {
        final String parameterName = descriptor.name(); // parameter name needed by function
        final Map<String, Object> parameters = step.parameters();
        if (Objects.isNull(parameters)) {
            return null;
        }
        final Object value = parameters.get(parameterName); // parameter value set by rule definition
        String syntax = "    " + parameterName + " : ";
        if (value == null) {
            return null;
        } else if (value instanceof String valueString) {
            if (StringUtils.isEmpty(valueString)) {
                return null;
            } else if (valueString.startsWith("$")) { // value set as variable
                syntax += valueString.substring(1);
            } else {
                syntax += "\"" + StringEscapeUtils.escapeJava(valueString) + "\""; // value set as string
            }
        } else {
            syntax += value;
        }
        return syntax;
    }
@Test
    public void addFunctionParameterNull_WhenNoParameterValueIsSet() {
        RuleBuilderStep step = mock(RuleBuilderStep.class);
        Map<String, Object> params = new HashMap<>();
        when(step.parameters()).thenReturn(params);
        ParameterDescriptor descriptor = mock(ParameterDescriptor.class);
        when(descriptor.optional()).thenReturn(true);
        assertThat(ParserUtil.addFunctionParameter(descriptor, step)).isNull();
    }