public static Map.Entry<String, String> getRegressionTableBuilder(final RegressionTable regressionTable,
                                                                      final RegressionCompilationDTO compilationDTO) {
        logger.trace("getRegressionTableBuilder {}", regressionTable);
        String className = "KiePMMLRegressionTable" + classArity.addAndGet(1);
        CompilationUnit cloneCU = JavaParserUtils.getKiePMMLModelCompilationUnit(className,
                                                                                 compilationDTO.getPackageName(),
                                                                                 KIE_PMML_REGRESSION_TABLE_TEMPLATE_JAVA, KIE_PMML_REGRESSION_TABLE_TEMPLATE);
        ClassOrInterfaceDeclaration tableTemplate = cloneCU.getClassByName(className)
                .orElseThrow(() -> new KiePMMLException(MAIN_CLASS_NOT_FOUND + ": " + className));
        final MethodDeclaration staticGetterMethod =
                tableTemplate.getMethodsByName(GETKIEPMML_TABLE).get(0);
        setStaticGetter(regressionTable, compilationDTO, staticGetterMethod, className.toLowerCase());
        return new AbstractMap.SimpleEntry<>(getFullClassName(cloneCU), cloneCU.toString());
    }
@Test
    void getRegressionTableBuilder() {
        regressionTable = getRegressionTable(3.5, "professional");
        RegressionModel regressionModel = new RegressionModel();
        regressionModel.setNormalizationMethod(RegressionModel.NormalizationMethod.CAUCHIT);
        regressionModel.addRegressionTables(regressionTable);
        regressionModel.setModelName(getGeneratedClassName("RegressionModel"));
        String targetField = "targetField";
        DataField dataField = new DataField();
        dataField.setName(targetField);
        dataField.setOpType(OpType.CATEGORICAL);
        DataDictionary dataDictionary = new DataDictionary();
        dataDictionary.addDataFields(dataField);
        MiningField miningField = new MiningField();
        miningField.setUsageType(MiningField.UsageType.TARGET);
        miningField.setName(dataField.getName());
        MiningSchema miningSchema = new MiningSchema();
        miningSchema.addMiningFields(miningField);
        regressionModel.setMiningSchema(miningSchema);
        PMML pmml = new PMML();
        pmml.setDataDictionary(dataDictionary);
        pmml.addModels(regressionModel);
        final CommonCompilationDTO<RegressionModel> source =
                CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                       pmml,
                                                                       regressionModel,
                                                                       new PMMLCompilationContextMock(),
                                                                       "FILENAME");
        final RegressionCompilationDTO compilationDTO =
                RegressionCompilationDTO.fromCompilationDTORegressionTablesAndNormalizationMethod(source,
                                                                                                  new ArrayList<>(),
                                                                                                  regressionModel.getNormalizationMethod());
        Map.Entry<String, String> retrieved = KiePMMLRegressionTableFactory.getRegressionTableBuilder(regressionTable
                , compilationDTO);
        assertThat(retrieved).isNotNull();
        Map<String, String> sources = new HashMap<>();
        sources.put(retrieved.getKey(), retrieved.getValue());
        commonValidateCompilation(sources);
    }