<?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">

    <!-- the test registers notifications via java that we want the connector to respond to,
         so disable caching -->
    <notifications dynamic="true"/>

    <model name="main">
        <service name="Receiver">
            <inbound>
                <vm:inbound-endpoint path="inbound.channel"/>
            </inbound>
            <outbound>
                <message-chunking-router messageSize="2">
                    <vm:outbound-endpoint path="chunking.channel"/>
                </message-chunking-router>
            </outbound>
        </service>

        <service name="ChunkingReceiver">
            <inbound>
                <vm:inbound-endpoint path="chunking.channel"/>
                <message-chunking-aggregator-router/>
            </inbound>
            <component class="org.mule.tck.functional.FunctionalTestComponent"/>
        </service>

        <!-- this has changed slightly from 1.x; we need to stop the functional test component from
             converting response to a string -->

        <service name="ObjectReceiver">
            <inbound>
                <vm:inbound-endpoint path="inbound.object.channel"/>
            </inbound>
            <outbound>
                <message-chunking-router messageSize="2">
                    <vm:outbound-endpoint path="chunking.object.channel"/>
                </message-chunking-router>
            </outbound>
        </service>

        <service name="ChunkingObjectReceiver">
            <inbound>
                <vm:inbound-endpoint path="chunking.object.channel"/>
                <message-chunking-aggregator-router/>
            </inbound>
            <component>
                <singleton-object class="org.mule.tck.functional.FunctionalTestComponent">
                    <property key="asString" value="false"/>
                </singleton-object>
            </component>
        </service>
    </model>

</mule>
