<?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:util="http://www.springframework.org/schema/util"
			 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/context https://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd">

	<beans:bean id="selector" class="org.springframework.integration.selector.PayloadTypeSelector">
		<beans:constructor-arg value="java.lang.String"/>
	</beans:bean>

	<idempotent-receiver id="selectorInterceptor" endpoint="foo" selector="selector"/>

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

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

	<idempotent-receiver id="strategyInterceptor"
						 endpoint="foo"
						 key-strategy="keyStrategy"
						 value-strategy="valueStrategy"
						 compare-values="valueComparator"
						 discard-channel="nullChannel"
						 throw-exception-on-rejection="true"/>

	<beans:bean id="valueComparator"
		class="org.springframework.integration.config.xml.IdempotentReceiverParserTests$AlwaysAccept"/>

	<beans:bean id="store" class="org.springframework.integration.metadata.SimpleMetadataStore"/>

	<util:properties id="properties">
		<beans:prop key="bar">bar*</beans:prop>
	</util:properties>

	<context:property-placeholder properties-ref="properties"/>

	<idempotent-receiver id="expressionInterceptor" endpoint="foo, ${bar}"
						 metadata-store="store"
						 key-expression="headers.foo"/>

</beans:beans>
