### Question:
ConsequenceFactory { public Invocation<ProcessingContext, Void> createConsequence(Rule rule, List<? extends Expression.Invocation> actions) { List<Invocation<ProcessingContext, Void>> invocations = actions.stream() .map(action -> createInvocation(rule, action)) .filter(Objects::nonNull) .collect(Collectors.toCollection(ArrayList::new)); return new Consequence(invocations, errorHandler); } ConsequenceFactory(ProcessingInvocationFactory<Void> invocationFactory);  ConsequenceFactory(ProcessingInvocationFactory<Void> invocationFactory, ErrorHandler errorHandler);  ConsequenceFactory(ProcessingInvocationFactory<Void> invocationFactory, ErrorHandler errorHandler, CallConverter actionConverter); Invocation<ProcessingContext, Void> createConsequence(Rule rule, List<? extends Expression.Invocation> actions);  }### Answer:
@Test void shouldProperlyConvertActionParametersAndCallActionInvocations() { Map<String, Argument.Invocation> invocations = new LinkedHashMap<>(); Map<String, Argument.Invocation> proceedInvocations = new LinkedHashMap<>(); consequenceFactory = new ConsequenceFactory((invocation) -> { invocations.put(invocation.getCall(), invocation); return context -> { proceedInvocations.put(invocation.getCall(), invocation); return null; }; }); Map<String, Object> bindings = new HashMap<>(); bindings.put(ProcessingContext.CONTEXT, new Object()); bindings.put(ProcessingContext.CURRENT_RULE_NAME, "ruleOne"); Invocation<ProcessingContext, Void> consequence = consequenceFactory.createConsequence(ruleWithName("ruleOne"), getActions()); consequence.proceed(new StaticProcessingContext(bindings, new Object[0])); assertThat(consequence).isNotNull(); assertThat(invocations.size()).isEqualTo(2); assertThat(invocations).containsKey("actionOne"); Argument.Invocation actionInvocation = invocations.get("actionOne"); assertThat(actionInvocation.getName()).isEqualTo("First Action"); assertThat(actionInvocation.getCall()).isEqualTo("actionOne"); List<Argument> arguments = actionInvocation.getArguments(); assertThat(arguments).containsExactly( Argument.valueOf("arg1", Boolean.FALSE), Argument.valueOf("arg2", Boolean.TRUE), Argument.valueOf("arg3", 1234L), Argument.valueOf("arg4", BigDecimal.valueOf(-123, 456)), Argument.valueOf("arg5", "Just a string"), Argument.valueOf("arg6", new InternalParameterizedType(null, List.class, Long.class), asList(1L, 2L)), Argument.valueOf("arg7", new InternalParameterizedType(null, List.class, String.class), asList("one", "two"))); assertThat(invocations).containsKey("actionTwo"); actionInvocation = invocations.get("actionTwo"); assertThat(actionInvocation.getName()).isEqualTo("Second action"); assertThat(actionInvocation.getCall()).isEqualTo("actionTwo"); arguments = actionInvocation.getArguments(); assertThat(arguments.size()).isEqualTo(0); assertThat(proceedInvocations).containsKeys("actionOne", "actionTwo"); }