public FEELFnResult<Map<String, Object>> invoke(@ParameterName("entries") List<Object> entries) {
        if (entries == null) {
            return FEELFnResult.ofError(new InvalidParametersEvent(FEELEvent.Severity.ERROR, "entries", "cannot be null"));
        }

        Map<String, Object> result = new HashMap<>();
        for (int i = 0; i < entries.size(); i++) {
            final int h_index = i + 1;
            if (entries.get(i) instanceof Map) {
                Map<?, ?> map = (Map<?, ?>) entries.get(i);
                String key;
                Object value;
                if (map.get("key") instanceof String) {
                    key = (String) map.get("key");
                } else {
                    return FEELFnResult.ofError(new InvalidParametersEvent(FEELEvent.Severity.ERROR, "entry of index " + (h_index) + " is missing a `key` entry"));
                }
                if (map.containsKey("value")) {
                    value = map.get("value");
                } else {
                    return FEELFnResult.ofError(new InvalidParametersEvent(FEELEvent.Severity.ERROR, "entry of index " + (h_index) + " is missing a `value` entry"));
                }
                if (result.containsKey(key)) {
                    return FEELFnResult.ofError(new InvalidParametersEvent(FEELEvent.Severity.ERROR, "entry of index " + (h_index) + " contains duplicate key"));
                }
                result.put(key, value);
            } else {
                return FEELFnResult.ofError(new InvalidParametersEvent(FEELEvent.Severity.ERROR, "entry of index " + (h_index) + " is not a valid context"));
            }
        }

        return FEELFnResult.ofResult(result);
    }
@Test
    void invokeContainsNoKeyAndValue() {
        FunctionTestUtil.assertResultError(contextFunction.invoke(List.of(
                Map.of("test", "name", "value", "John Doe"),
                Map.of("key", "name", "test", "John Doe"))), InvalidParametersEvent.class);
    }