}); assertTrue(foo() == 1);
}}); TestEnhancerTransform another = new TestEnhancerTransform(); assertTrue(another.foo() == 1);  TestEnhancerTransform proxied = (TestEnhancerTransform)Enhancer.create(getClass(), new MethodInterceptor() { public Object intercept(Object obj, java.lang.reflect.Method method, Object[] args, MethodProxy proxy) { return new Integer(2); } }); assertTrue(proxied.foo() == 2);
    public void test() {        assertTrue(foo() == 0);        ((Factory)this).setCallback(0, new MethodInterceptor() {            public Object intercept(Object obj, java.lang.reflect.Method method, Object[] args, MethodProxy proxy) {                return new Integer(1);            }        });        assertTrue(foo() == 1);    }