public static void populateGetCreatedLocalTransformationsMethod(final ClassOrInterfaceDeclaration toPopulate,
                                                                    final LocalTransformations localTransformations) {
        if (localTransformations != null) {
            BlockStmt createLocalTransformationsBody =
                    KiePMMLLocalTransformationsFactory.getKiePMMLLocalTransformationsVariableDeclaration(localTransformations);
            createLocalTransformationsBody.addStatement(getReturnStmt(LOCAL_TRANSFORMATIONS));
            final MethodDeclaration methodDeclaration =
                    toPopulate.getMethodsByName(GET_CREATED_LOCAL_TRANSFORMATIONS).get(0);
            methodDeclaration.setBody(createLocalTransformationsBody);
        }
    }
@Test
    void populateGetCreatedLocalTransformationsMethod() throws IOException {
        org.kie.pmml.compiler.commons.codegenfactories.KiePMMLModelFactoryUtils.populateGetCreatedLocalTransformationsMethod(classOrInterfaceDeclaration,
                                                                                                                             model.getLocalTransformations());
        final MethodDeclaration retrieved =
                classOrInterfaceDeclaration.getMethodsByName(GET_CREATED_LOCAL_TRANSFORMATIONS).get(0);
        String text = getFileContent(TEST_08_SOURCE);
        MethodDeclaration expected = JavaParserUtils.parseMethod(text);
        assertThat(JavaParserUtils.equalsNode(expected, retrieved)).isTrue();
    }