@Test
public void getApplyExpressionBlockStmt() {

    Apply apply = applySupplier.get();
    String variableName = "VARIABLE_NAME";
    BlockStmt retrieved = ExpressionFunctionUtils.getApplyExpressionBlockStmt(variableName, apply,
                                                                              parseClassOrInterfaceType(Object.class.getName()), DEFAULT_PARAMETERTYPE_MAP);
    String expected = "{\n" +
            "    java.lang.Object variableVARIABLE_NAMEConstant1 = 34.6;\n" +
            "    java.util.Optional<org.kie.pmml.commons.model.tuples.KiePMMLNameValue> kiePMMLNameValue = param1" +
            ".stream().filter((org.kie.pmml.commons.model.tuples.KiePMMLNameValue lmbdParam) -> java.util.Objects" +
            ".equals(\"FIELD_REF\", lmbdParam.getName())).findFirst();\n" +
            "    java.lang.Object variableVARIABLE_NAMEFieldRef2 = (java.lang.Object) kiePMMLNameValue.map(org" +
            ".kie.pmml.commons.model.tuples.KiePMMLNameValue::getValue).orElse(null);\n" +
            "    java.lang.Object VARIABLE_NAME = this.FUNCTION_NAME(param1, variableVARIABLE_NAMEConstant1, " +
            "variableVARIABLE_NAMEFieldRef2);\n" +
            "}";
    assertEquals(expected, retrieved.toString());
}