static Object[] calculateActualParams(Method m, NamedParameter[] params) {
        logger.trace("calculateActualParams {} {}", m, params);
        List<String> names = getParametersNames(m);
        Object[] actualParams = new Object[names.size()];
        boolean isVariableParameters =
                m.getParameterCount() > 0 && m.getParameterTypes()[m.getParameterCount() - 1].isArray();
        String variableParamPrefix = isVariableParameters ? names.get(names.size() - 1) : null;
        List<Object> variableParams = isVariableParameters ? new ArrayList<>() : null;
        for (NamedParameter np : params) {
            if (!calculateActualParam(np, names, actualParams, isVariableParameters, variableParamPrefix,
                                      variableParams)) {
                return null;
            }
        }
        if (isVariableParameters) {
            actualParams[actualParams.length - 1] = variableParams.toArray();
        }
        return actualParams;
    }
@Test
    void calculateActualParams() throws NoSuchMethodException {
        // CeilingFunction.invoke(@ParameterName( "n" ) BigDecimal n)
        Method m = CeilingFunction.class.getMethod("invoke", BigDecimal.class);
        assertNotNull(m);
        NamedParameter[] parameters = {new NamedParameter("n", BigDecimal.valueOf(1.5))};
        Object[] retrieved = BaseFEELFunctionHelper.calculateActualParams(m, parameters);
        assertNotNull(retrieved);
        assertEquals(parameters.length, retrieved.length);
        assertEquals(parameters[0].getValue(), retrieved[0]);

        parameters = new NamedParameter[]{new NamedParameter("undefined", BigDecimal.class)};
        retrieved = BaseFEELFunctionHelper.calculateActualParams(m, parameters);
        assertNull(retrieved);
    }