<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:spring="http://www.springframework.org/schema/beans"
       xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.0"
       xsi:schemaLocation="
               http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
               http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
               http://www.mulesource.org/schema/mule/vm/2.0 http://www.mulesource.org/schema/mule/vm/2.0/mule-vm.xsd">

    <spring:bean name="advice" class="org.mule.config.spring.FunctionalTestAdvice"/>
    <spring:bean name="pointcut" class="org.springframework.aop.support.JdkRegexpMethodPointcut">
        <!-- we must name the correct interface below, FunctionalTestComponent itself does not work -->
        <spring:property name="pattern" value="org.mule.api.lifecycle.Callable.onCall"/>
    </spring:bean>
    <spring:bean name="advisor" class="org.springframework.aop.support.DefaultPointcutAdvisor">
        <spring:property name="advice" ref="advice"/>
        <spring:property name="pointcut" ref="pointcut"/>
    </spring:bean>

    <spring:bean name="proxyCreator" class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator">
        <spring:property name="interceptorNames">
            <spring:list>
                <spring:value>advisor</spring:value>
            </spring:list>
        </spring:property>
    </spring:bean>

    <spring:bean name="target" class="org.mule.tck.functional.FunctionalTestComponent">
        <spring:property name="enableMessageHistory" value="false"/>
    </spring:bean>

    <model name="model">
        <service name="service">
            <inbound>
                <vm:inbound-endpoint path="in"/>
            </inbound>
            <component>
                <spring-object bean="target"/>
            </component>
        </service>
    </model>

</mule>
        