static List<String> getParametersNames(Method m) {
        logger.trace("getParametersNames {}", m);
        Annotation[][] pas = m.getParameterAnnotations();
        List<String> toReturn = new ArrayList<>(m.getParameterCount());
        for (int i = 0; i < m.getParameterCount(); i++) {
            for (int p = 0; p < pas[i].length; i++) {
                if (pas[i][p] instanceof ParameterName) {
                    toReturn.add(((ParameterName) pas[i][p]).value());
                    break;
                }
            }
            if (toReturn.get(i) == null) {
                // no name found
                return null;
            }
        }
        return toReturn;
    }
@Test
    void getParametersNames() throws NoSuchMethodException {
        // SumFunction.invoke(@ParameterName("n") Object[] list)
        Method m = SumFunction.class.getMethod("invoke", Object.class.arrayType());
        assertNotNull(m);
        List<String> retrieved = BaseFEELFunctionHelper.getParametersNames(m);
        assertNotNull(retrieved);
        int counter = 0;
        Annotation[][] pas = m.getParameterAnnotations();
        for (Annotation[] annotations : pas) {
            for (Annotation annotation : annotations) {
                if (annotation instanceof ParameterName parameterName) {
                    assertEquals(parameterName.value(), retrieved.get(counter));
                    counter++;
                }
            }
        }

        // DateAndTimeFunction.invoke(@ParameterName( "year" ) Number year, @ParameterName( "month" ) Number month,
        // @ParameterName( "day" ) Number day,
        //                                                 @ParameterName( "hour" ) Number hour, @ParameterName(
        //                                                 "minute" ) Number minute, @ParameterName( "second" )
        //                                                 Number second,
        //                                                 @ParameterName( "hour offset" ) Number hourOffset )
        m = DateAndTimeFunction.class.getMethod("invoke", Number.class,
                                                Number.class,
                                                Number.class,
                                                Number.class,
                                                Number.class,
                                                Number.class,
                                                Number.class);
        assertNotNull(m);
        retrieved = BaseFEELFunctionHelper.getParametersNames(m);
        assertNotNull(retrieved);
        counter = 0;
        pas = m.getParameterAnnotations();
        for (Annotation[] annotations : pas) {
            for (Annotation annotation : annotations) {
                if (annotation instanceof ParameterName parameterName) {
                    assertEquals(parameterName.value(), retrieved.get(counter));
                    counter++;
                }
            }
        }
    }