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

	<bean id="smbSessionFactory"
		  class="org.springframework.integration.smb.config.SmbInboundChannelAdapterParserTests.TestSessionFactoryBean"/>

	<bean id="acceptAllFilter" class="org.springframework.integration.file.filters.AcceptAllFileListFilter"/>

	<int-smb:inbound-channel-adapter id="smbInbound"
									 auto-startup="false"
									 channel="smbChannel"
									 session-factory="smbSessionFactory"
									 charset="UTF-8"
									 auto-create-local-directory="true"
									 delete-remote-files="true"
									 filename-pattern="*.txt"
									 local-filter="acceptAllFilter"
									 local-directory="file:test-temp/local-1"
									 remote-file-separator=""
									 comparator="comparator"
									 temporary-file-suffix=".working.tmp"
									 remote-directory="test-temp/remote-1">
	</int-smb:inbound-channel-adapter>

	<bean id="comparator" class="org.mockito.Mockito" factory-method="mock">
		<constructor-arg value="java.util.Comparator"/>
	</bean>

	<int-smb:inbound-channel-adapter
			channel="smbChannel"
			auto-startup="false"
			session-factory="smbSessionFactory"
			charset="UTF-8"
			auto-create-local-directory="true"
			delete-remote-files="true"
			filter="entryListFilter"
			local-directory="file:test-temp/local-2"
			remote-directory="test-temp/remote-2">
	</int-smb:inbound-channel-adapter>

	<int-smb:inbound-channel-adapter id="simpleAdapter"
									 channel="smbChannel"
									 auto-startup="false"
									 session-factory="smbSessionFactory"
									 local-directory="file:test-temp/local-3"
									 remote-directory="test-temp/remote-3">
	</int-smb:inbound-channel-adapter>

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

	<bean id="entryListFilter" class="org.mockito.Mockito" factory-method="mock">
		<constructor-arg value="org.springframework.integration.file.filters.FileListFilter"/>
	</bean>

	<int:poller fixed-rate="10000" default="true"/>

</beans>
