### Question:
ActionConverter { List<Expression.Action> convert(List<Action> actions) { return actions.stream() .map(this::convert) .collect(Collectors.toList()); } ActionConverter(NodeConverter nodeConverter);   }### Answer:
@Test void shouldConvertAction() { Action toConvert = new Action() .withName("action-name") .withParameters( new Parameter() .withName("parameter-name-1") .withExpression(new Value() .withValue("value-value") .withType("String")), new Parameter() .withName("parameter-name-2") .withExpression(new Values() .withType("Set") .withValues( new Value() .withValue(100L) .withType("Long") )), new Parameter() .withName("parameter-name-3") .withExpression(new Function() .withName("function-name") .withReturnType("Boolean") .withParameters(Collections.emptyList())) ); List<Expression.Action> actions = actionConverter.convert(Collections.singletonList(toConvert)); Expression.Action expected = actionOf("action-name", "action-name", Arrays.asList( valueOf("parameter-name-1", String.class, "value-value"), valuesOf("parameter-name-2", Set.class, Collections.singletonList( valueOf(null, Long.class, 100L) )), functionOf("parameter-name-3", Boolean.class, "function-name", Collections.emptyList()) )); assertThat(actions).containsExactly(expected); }