@Test
public void setConstructor() {

    Model model = new TreeModel();
    PMML_MODEL pmmlModel = PMML_MODEL.byName(model.getClass().getSimpleName());
    ConstructorDeclaration constructorDeclaration = MODEL_TEMPLATE.getDefaultConstructor().get();
    SimpleName tableName = new SimpleName("TABLE_NAME");
    String targetField = "TARGET_FIELD";
    MINING_FUNCTION miningFunction = MINING_FUNCTION.CLASSIFICATION;
    KiePMMLDroolsModelFactoryUtils.setConstructor(model, constructorDeclaration, tableName, targetField,
                                                  miningFunction);
    Map<Integer, Expression> superInvocationExpressionsMap = new HashMap<>();
    Map<String, Expression> assignExpressionMap = new HashMap<>();
    assignExpressionMap.put("targetField", new StringLiteralExpr(targetField));
    assignExpressionMap.put("miningFunction",
                            new NameExpr(miningFunction.getClass().getName() + "." + miningFunction.name()));
    assignExpressionMap.put("pmmlMODEL", new NameExpr(pmmlModel.getClass().getName() + "." + pmmlModel.name()));
    assertTrue(commonEvaluateConstructor(constructorDeclaration, tableName.asString(), superInvocationExpressionsMap,
                              assignExpressionMap));
}