static void setConstructor(final ScorecardCompilationDTO compilationDTO,
                               final ClassOrInterfaceDeclaration modelTemplate,
                               final String fullCharacteristicsClassName) {
        KiePMMLModelFactoryUtils.init(compilationDTO,
                                      modelTemplate);
        final ConstructorDeclaration constructorDeclaration =
                modelTemplate.getDefaultConstructor().orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_DEFAULT_CONSTRUCTOR, modelTemplate.getName())));
        final BlockStmt body = constructorDeclaration.getBody();
        final ExplicitConstructorInvocationStmt superStatement =
                CommonCodegenUtils.getExplicitConstructorInvocationStmt(body)
                        .orElseThrow(() -> new KiePMMLException(String.format(MISSING_CONSTRUCTOR_IN_BODY, body)));
        ClassOrInterfaceType characteristicsClass = parseClassOrInterfaceType(fullCharacteristicsClassName);
        ObjectCreationExpr characteristicsReference = new ObjectCreationExpr();
        characteristicsReference.setType(characteristicsClass);
        superStatement.setArgument(3, characteristicsReference);
        superStatement.setArgument(4, getExpressionForObject(compilationDTO.getInitialScore()));
        superStatement.setArgument(5, getExpressionForObject(compilationDTO.isUseReasonCodes()));
        REASONCODE_ALGORITHM reasoncodeAlgorithm = compilationDTO.getREASONCODE_ALGORITHM();
        NameExpr reasonCodeExpr = new NameExpr(REASONCODE_ALGORITHM.class.getName() + "." + reasoncodeAlgorithm.name());
        superStatement.setArgument(6, reasonCodeExpr);
        superStatement.setArgument(7, getExpressionForObject(compilationDTO.getBaselineScore()));
    }
@Test
    void setConstructor() {
        String fullCharacteristicsClassName = PACKAGE_NAME + ".fullCharacteristicsClassName";
        final CommonCompilationDTO<Scorecard> source =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       basicComplexPartialScorePmml,
                                                                       basicComplexPartialScore,
                                                                       new PMMLCompilationContextMock(),
                                                                       BASIC_COMPLEX_PARTIAL_SCORE_SOURCE);
        KiePMMLScorecardModelFactory.setConstructor(ScorecardCompilationDTO.fromCompilationDTO(source),
                scorecardTemplate,
                fullCharacteristicsClassName);
        final ConstructorDeclaration constructorDeclaration =
                scorecardTemplate.getDefaultConstructor().orElseThrow(() -> new KiePMMLInternalException(String.format(MISSING_DEFAULT_CONSTRUCTOR, scorecardTemplate.getName())));
        final BlockStmt body = constructorDeclaration.getBody();
        final ExplicitConstructorInvocationStmt retrieved =
                CommonCodegenUtils.getExplicitConstructorInvocationStmt(body)
                        .orElseThrow(() -> new KiePMMLException(String.format(MISSING_CONSTRUCTOR_IN_BODY, body)));
        Statement expected = JavaParserUtils
                .parseStatement(String.format("super(\"%1$s\", \"%2$s\", Collections.emptyList()" +
                                                      ", new %3$s" +
                                                      "(), %4$s, %5$s, %6$s, %7$s);\n",
                                              FILE_NAME_NO_SUFFIX,
                                              getSanitizedClassName(basicComplexPartialScore.getModelName()),
                                              fullCharacteristicsClassName,
                                              basicComplexPartialScore.getInitialScore(),
                                              basicComplexPartialScore.isUseReasonCodes(),
                                              REASONCODE_ALGORITHM.class.getName() + "." + REASONCODE_ALGORITHM.byName(basicComplexPartialScore.getReasonCodeAlgorithm().value()),
                                              basicComplexPartialScore.getBaselineScore()
                ));
        assertThat(expected.toString()).isEqualTo(retrieved.toString());
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
    }