public FEELFnResult<List> invoke(@ParameterName( "list" ) Object list) {
        if ( list == null ) {
            return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "list", "cannot be null"));
        }
        // spec requires us to return a new list
        final List<Object> result = new ArrayList<>();
        flattenList( list, result );
        return FEELFnResult.ofResult( result );
    }
@Test
    void invokeParamCollection() {
        FunctionTestUtil.assertResult(flattenFunction.invoke(Arrays.asList("test", 1, 2)), Arrays.asList("test", 1, 2));
        FunctionTestUtil.assertResult(flattenFunction.invoke(Arrays.asList("test", 1, 2, Arrays.asList(3, 4))),
                                      Arrays.asList("test", 1, 2, 3, 4));
        FunctionTestUtil.assertResult(flattenFunction.invoke(Arrays.asList("test", 1, 2, Arrays.asList(1, 2))),
                                      Arrays.asList("test", 1, 2, 1, 2));
        FunctionTestUtil.assertResult(
                flattenFunction.invoke(
                        Arrays.asList("test", 1, Arrays.asList(BigDecimal.ZERO, 3), 2, Arrays.asList(1, 2))),
                Arrays.asList("test", 1, BigDecimal.ZERO, 3, 2, 1, 2));

        FunctionTestUtil.assertResult(
                flattenFunction.invoke(
                        Arrays.asList("test", 1, Arrays.asList(Arrays.asList(10, 15), BigDecimal.ZERO, 3), 2,
                                      Arrays.asList(1, 2))),
                Arrays.asList("test", 1, 10, 15, BigDecimal.ZERO, 3, 2, 1, 2));
    }