<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/integration/xmpp https://www.springframework.org/schema/integration/xmpp/spring-integration-xmpp.xsd"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:int-xmpp="http://www.springframework.org/schema/integration/xmpp">

	<bean id="testConnection" class="org.mockito.Mockito" factory-method="mock">
		<constructor-arg value="org.jivesoftware.smack.XMPPConnection"/>
	</bean>

	<int:channel id="outboundEventChannel"/>

	<int-xmpp:outbound-channel-adapter id="outboundEventAdapter"
					channel="outboundEventChannel"
					xmpp-connection="testConnection"
					mapped-request-headers="foo*, bar*"/>

	<int:channel id="outboundPollingChannel">
		<int:queue/>
	</int:channel>

	<int-xmpp:outbound-channel-adapter id="pollingConsumer"
					channel="outboundPollingChannel"
					xmpp-connection="testConnection">
		<int:poller fixed-rate="5000" max-messages-per-poll="1"/>
	</int-xmpp:outbound-channel-adapter>

	<int-xmpp:outbound-channel-adapter id="withHeaderMapper"
					channel="outboundPollingChannel"
					xmpp-connection="testConnection"
					header-mapper="headerMapper">
		<int:poller fixed-rate="5000" max-messages-per-poll="1"/>
	</int-xmpp:outbound-channel-adapter>

	<bean id="headerMapper" class="org.springframework.integration.xmpp.support.DefaultXmppHeaderMapper">
		<property name="requestHeaderNames" value="foo*"/>
	</bean>

	<int-xmpp:outbound-channel-adapter id="outboundNoChannelAdapter"
						xmpp-connection="testConnection">
	</int-xmpp:outbound-channel-adapter>

	<int-xmpp:outbound-channel-adapter id="advised" channel="errorChannel"
						xmpp-connection="testConnection">
		<int-xmpp:request-handler-advice-chain>
			<bean class="org.springframework.integration.xmpp.config.ChatMessageOutboundChannelAdapterParserTests$FooAdvice" />
		</int-xmpp:request-handler-advice-chain>
	</int-xmpp:outbound-channel-adapter>

	<int:chain input-channel="outboundChainChannel">
		<int-xmpp:outbound-channel-adapter xmpp-connection="testConnection"/>
	</int:chain>

</beans>
