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

	<context:property-placeholder location="../../../../../../resources/test.properties"/>

	<xmpp:xmpp-connection
			id="testConnection"
			user="${user.1.login}"
			password="${user.1.password}"/>

	<console:stdout-channel-adapter id="stdout" append-newline="true"/>

	<console:stdin-channel-adapter id="stdin">
		<poller fixed-rate="1000"/>
	</console:stdin-channel-adapter>

	<xmpp:header-enricher input-channel="stdin" output-channel="messagesToSend">
		<xmpp:chat-to value="${user.2.login}"/>
	</xmpp:header-enricher>

	<xmpp:inbound-channel-adapter channel="stdout" xmpp-connection="testConnection"/>

	<channel id="messagesToSend"/>

	<xmpp:outbound-channel-adapter channel="messagesToSend" xmpp-connection="testConnection"/>

</beans:beans>
