@Test
public void getNumericPredictorWithExponentTemplate() {

    String predictorName = "predictorName";
    int exponent = 2;
    double coefficient = 1.23;
    NumericPredictor numericPredictor = PMMLModelTestUtils.getNumericPredictor(predictorName, exponent,
                                                                               coefficient);
    CompilationUnit templateEvaluate = getFromFileName(KIE_PMML_EVALUATE_METHOD_TEMPLATE_JAVA);
    CompilationUnit cloneEvaluate = templateEvaluate.clone();
    ClassOrInterfaceDeclaration evaluateTemplateClass =
            cloneEvaluate.getClassByName(KIE_PMML_EVALUATE_METHOD_TEMPLATE)
                    .orElseThrow(() -> new KiePMMLException(MAIN_CLASS_NOT_FOUND));
    MethodDeclaration retrieved =
            KiePMMLRegressionTableRegressionFactory.getNumericPredictorWithExponentTemplate(numericPredictor,
                                                                                            evaluateTemplateClass);
    BlockStmt body = retrieved.getBody().get();
    String expected = String.format("{\n" +
                                            "    double coefficient = %s;\n" +
                                            "    double exponent = %s.0;\n" +
                                            "    // Considering exponent because it is != 1\n" +
                                            "    return Math.pow(input, exponent) * coefficient;\n" +
                                            "}", coefficient, exponent);
    assertEquals(expected, body.toString());
}