@Test
public void setCompoundPredicateConstructorAnd() {

    init(KIE_PMML_COMPOUND_PREDICATE_TEMPLATE_JAVA, KIE_PMML_COMPOUND_PREDICATE_TEMPLATE);
    String generatedClassName = "GENERATEDCLASSNAME";
    String predicateName = "PREDICATENAME";
    Set<String> predicatesClasses = new HashSet<>(Arrays.asList("PREDICATE_A", "PREDICATE_B"));
    BOOLEAN_OPERATOR booleanOperator = BOOLEAN_OPERATOR.AND;
    KiePMMLPredicateFactory.setCompoundPredicateConstructor(generatedClassName,
                                                            predicateName,
                                                            constructorDeclaration,
                                                            booleanOperator,
                                                            predicatesClasses);
    Map<Integer, Expression> superInvocationExpressionsMap = new HashMap<>();
    superInvocationExpressionsMap.put(0, new NameExpr(String.format("\"%s\"", predicateName)));
    superInvocationExpressionsMap.put(2,
                                      new NameExpr(booleanOperator.getClass().getCanonicalName() + "." + booleanOperator.name()));
    Map<String, Expression> assignExpressionMap = new HashMap<>();
    Expression expression = parseExpression("(aBoolean, aBoolean2) -> aBoolean != null ? aBoolean && aBoolean2 : aBoolean2");
    assignExpressionMap.put("operatorFunction", expression);
    ClassOrInterfaceType kiePMMLSegmentClass = parseClassOrInterfaceType(ArrayList.class.getName());
    ObjectCreationExpr objectCreationExpr = new ObjectCreationExpr();
    objectCreationExpr.setType(kiePMMLSegmentClass);
    assignExpressionMap.put("kiePMMLPredicates", objectCreationExpr);
    assertTrue(commonEvaluateConstructor(constructorDeclaration, generatedClassName, superInvocationExpressionsMap,
                              assignExpressionMap));
}