@Test
public void setSimpleSetPredicateConstructor() {

    init(KIE_PMML_SIMPLE_SET_PREDICATE_TEMPLATE_JAVA, KIE_PMML_SIMPLE_SET_PREDICATE_TEMPLATE);
    AssignExpr valueAssignExpr =
            assignExprs.stream().filter(assignExpr -> assignExpr.getTarget().asNameExpr().getNameAsString().equals("values"))
            .findFirst()
            .orElseThrow(() -> new RuntimeException("Missing \"values\" assign variable"));
    assertTrue(valueAssignExpr.getValue() instanceof NullLiteralExpr);
    String generatedClassName = "GENERATEDCLASSNAME";
    String predicateName = "PREDICATENAME";
    ARRAY_TYPE arrayType = ARRAY_TYPE.REAL;
    IN_NOTIN inNotIn = IN_NOTIN.IN;
    List<Object> values = getObjects(arrayType, 3);
    KiePMMLPredicateFactory.setSimpleSetPredicateConstructor(generatedClassName,
                                                             predicateName,
                                                             constructorDeclaration,
                                                             arrayType,
                                                             inNotIn,
                                                             values);
    Map<Integer, Expression> superInvocationExpressionsMap = new HashMap<>();
    superInvocationExpressionsMap.put(0, new NameExpr(String.format("\"%s\"", predicateName)));
    superInvocationExpressionsMap.put(2,
                                      new NameExpr(arrayType.getClass().getCanonicalName() + "." + arrayType.name()));
    superInvocationExpressionsMap.put(3,
                                      new NameExpr(inNotIn.getClass().getCanonicalName() + "." + inNotIn.name()));
    Map<String, Expression> assignExpressionMap = new HashMap<>();
    ClassOrInterfaceType kiePMMLSegmentClass = parseClassOrInterfaceType(ArrayList.class.getName());
    ObjectCreationExpr objectCreationExpr = new ObjectCreationExpr();
    objectCreationExpr.setType(kiePMMLSegmentClass);
    assignExpressionMap.put("values", objectCreationExpr);
    assertTrue(commonEvaluateConstructor(constructorDeclaration, generatedClassName, superInvocationExpressionsMap,
                              assignExpressionMap));
    List<MethodCallExpr> methodCallExprs = constructorDeclaration.getBody()
            .getStatements().stream().filter(statement -> statement instanceof ExpressionStmt)
            .map(statement -> (ExpressionStmt) statement)
            .filter(expressionStmt -> expressionStmt.getExpression() instanceof MethodCallExpr)
            .map(expressionStmt -> (MethodCallExpr) expressionStmt.getExpression())
            .filter(methodCallExpr -> methodCallExpr.getScope().isPresent() &&
                    methodCallExpr.getScope().get().asNameExpr().getName().asString().equals("values") &&
                    methodCallExpr.getName().asString().equals("add"))
            .collect(Collectors.toList());
    assertNotNull(methodCallExprs);
    assertEquals(values.size(), methodCallExprs.size());
    values.forEach(o -> {
        Expression expected = new NameExpr(o.toString());
        assertTrue(methodCallExprs.stream()
                           .anyMatch(methodCallExpr -> methodCallExpr.getArguments().size() == 1 &&
                                   methodCallExpr.getArguments().get(0).equals(expected)));
    });
}