From 2540d63b9062bdd34ee58dd9d860b2d12d484704 Mon Sep 17 00:00:00 2001 From: Iwein Fuld Date: Tue, 10 Feb 2009 13:26:59 +0000 Subject: [PATCH] RESOLVED - issue INT-574: Chain element should support aggregators mid chain as well as handlers extending AbstractReplyProducingMessageHandler http://jira.springframework.org/browse/INT-574 test expanded for nested chain... just curious. --- .../integration/config/ChainParserTests-context.xml | 4 ++++ .../integration/config/ChainParserTests.java | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/config/ChainParserTests-context.xml b/org.springframework.integration/src/test/java/org/springframework/integration/config/ChainParserTests-context.xml index 3059498d6e..6291982e14 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/config/ChainParserTests-context.xml +++ b/org.springframework.integration/src/test/java/org/springframework/integration/config/ChainParserTests-context.xml @@ -47,6 +47,10 @@ + + + + successMessage = MessageBuilder.withPayload("success").build(); @@ -122,6 +125,16 @@ public class ChainParserTests { assertThat(reply, is(successMessage)); } + @Test + @SuppressWarnings("unchecked") + public void chainNestingAndAggregation() throws Exception { + Message message = MessageBuilder.withPayload("test").setCorrelationId(1).setSequenceSize(1).build(); + this.aggregatorInput.send(message); + Message reply = this.output.receive(3000); + assertNotNull(reply); + assertThat((String)reply.getPayload(), is("foo")); + } + public static class StubHandler extends AbstractReplyProducingMessageHandler { @Override