<commit_before>package org.codehaus.groovy.grails.webflow.engine.builder;

import org.springframework.webflow.engine.*
import org.codehaus.groovy.grails.commons.metaclass.*
import org.springframework.webflow.test.execution.*
import org.springframework.webflow.definition.*


class FlowBuilderSubFlowExecutionTests extends AbstractFlowExecutionTests{

    void setUp() {
        ExpandoMetaClass.enableGlobally()
    }

    void tearDown() {
        ExpandoMetaClass.disableGlobally()
    }    

    def foo() {
        "bar"
    }

    void testClosureMetaClassModifications() {

         ExpandoMetaClass.enableGlobally()
         def callable = {
            foo()
         }
         def metaClass = GroovySystem.metaClassRegistry.getMetaClass(callable.class)
         metaClass.invokeMethod = {String name, args-> "foo" }
         assertEquals "foo", callable()<commit_msg>fixes for failing test cases<commit_after>package org.codehaus.groovy.grails.webflow.engine.builder;

import org.springframework.webflow.engine.*
import org.springframework.webflow.test.execution.*
import org.springframework.webflow.definition.*


class FlowBuilderSubFlowExecutionTests extends AbstractFlowExecutionTests{

    void setUp() {
        ExpandoMetaClass.enableGlobally()
    }

    void tearDown() {
        ExpandoMetaClass.disableGlobally()
    }    

    def foo() {
        "bar"
    }

    void testClosureMetaClassModifications() {
     def callable = {
            foo()
         }
         def metaClass = GroovySystem.metaClassRegistry.getMetaClass(callable.class)
         metaClass.invokeMethod = {String name, args-> "foo" }
         assertEquals "foo", callable()
{'fraction_non_alphanumeric': 0.09598080383923216, 'fraction_numerical': 0.0, 'mean_word_length': 3.0583941605839415, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4945812', 'n_tokens_mistral': 483, 'n_tokens_neox': 470, 'n_words': 80}