public static void populateGetCreatedMiningFieldsMethod(final ClassOrInterfaceDeclaration modelTemplate,
                                                            final List<MiningField> miningFields) {
        final MethodDeclaration methodDeclaration = modelTemplate.getMethodsByName(GET_CREATED_MININGFIELDS).get(0);
        final List<ObjectCreationExpr> miningFieldsObjectCreations = getMiningFieldsObjectCreations(miningFields);
        populateListInListGetter(miningFieldsObjectCreations, methodDeclaration, TO_RETURN);
    }
@Test
    void populateGetCreatedMiningFieldsMethod() throws IOException {
        final CompilationDTO compilationDTO = CommonCompilationDTO.fromGeneratedPackageNameAndFields(PACKAGE_NAME,
                                                                                                     pmmlModel,
                                                                                                     model,
                                                                                                     new PMMLCompilationContextMock(), SOURCE_BASE);
        org.kie.pmml.compiler.commons.codegenfactories.KiePMMLModelFactoryUtils.populateGetCreatedMiningFieldsMethod(classOrInterfaceDeclaration,
                                                                                                                     compilationDTO.getKieMiningFields());
        final MethodDeclaration retrieved =
                classOrInterfaceDeclaration.getMethodsByName(GET_CREATED_MININGFIELDS).get(0);
        String text = getFileContent(TEST_14_SOURCE);
        MethodDeclaration expected = JavaParserUtils.parseMethod(text);
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
    }