static boolean calculateActualParamVariableParameters(NamedParameter np, String variableParamPrefix,
                                                          List<Object> variableParams) {
        logger.trace("calculateActualParamVariableParameters {} {} {}", np, variableParamPrefix, variableParams);
        // check if it is a variable parameters method
        if (np.getName().matches(variableParamPrefix + "\\d+")) {
            int index = Integer.parseInt(np.getName().substring(variableParamPrefix.length())) - 1;
            if (variableParams.size() <= index) {
                for (int i = variableParams.size(); i < index; i++) {
                    // need to add nulls in case the user skipped indexes
                    variableParams.add(null);
                }
                variableParams.add(np.getValue());
            } else {
                variableParams.set(index, np.getValue());
            }
        } else {
            // invalid parameter, method is incompatible
            return false;
        }
        return true;
    }
@Test
    void calculateActualParamVariableParameters() {
        // populate by variableparameters
        String variableParamPrefix = "varPref";
        int varIndex = 12;
        NamedParameter np = new NamedParameter(variableParamPrefix + varIndex, BigDecimal.valueOf(1.5));
        List<Object> variableParams = new ArrayList<>();
        assertTrue(BaseFEELFunctionHelper.calculateActualParamVariableParameters(np, variableParamPrefix,
                                                                                 variableParams));
        assertEquals(varIndex, variableParams.size());
        for (int i = 0; i < varIndex - 1; i++) {
            assertNull(variableParams.get(i));
        }
        assertEquals(np.getValue(), variableParams.get(varIndex - 1));

        np = new NamedParameter("variableParamPrefix", BigDecimal.valueOf(1.5));
        variableParams = new ArrayList<>();
        assertFalse(BaseFEELFunctionHelper.calculateActualParamVariableParameters(np, variableParamPrefix,
                                                                                  variableParams));
    }