<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/integration/jdbc"
	xmlns:beans="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/jdbc
			https://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd">

	<beans:bean id="preparedStatementSetter" class="org.mockito.Mockito" factory-method="mock">
		<beans:constructor-arg value="org.springframework.integration.jdbc.MessagePreparedStatementSetter"
							   type="java.lang.Class"/>
	</beans:bean>

	<!-- Invalid Config
	<outbound-channel-adapter id="invalid"
							  query="invalid anyway"
							  data-source="dataSource"
							  prepared-statement-setter="preparedStatementSetter"
							  sql-parameter-source-factory="sqlParameterSourceFactory"/>-->

	<outbound-channel-adapter query="insert into foos (id, status, name) values (:headers[id], 0, :foo)"
		channel="target" data-source="dataSource" sql-parameter-source-factory="sqlParameterSourceFactory"/>

	<beans:import resource="jdbcOutboundChannelAdapterCommonConfig.xml" />

	<beans:bean id="sqlParameterSourceFactory" class="org.springframework.integration.jdbc.BeanPropertySqlParameterSourceFactory">
		<beans:property name="staticParameters">
			<beans:map><beans:entry key="foo" value="bar"/></beans:map>
		</beans:property>
	</beans:bean>

</beans:beans>
