Hi, I have made modification in camel-bindy concerning the jira ticket : 2773. I have created a new test for that : org.apache.camel.dataformat.bindy.fix.BindySimpleKeyValuePairWithoutSectionMarshallDslTest. The code works except that the error is not returned into the exchange message arriving at the error mock end point
Help is required For the moment I have commented this part of the test @Test public void testMarshallWithoutSection() throws Exception { template.sendBody(generateModel()); // We don't expect to have a message as an error will be raised result.expectedMessageCount(0); // Message has been delivered to the mock error error.expectedMessageCount(1); result.assertIsSatisfied(); error.assertIsSatisfied(); // and check that we have the caused exception stored Exchange exch = error.getReceivedExchanges().get(0); /** Exception cause = exch.getProperty(Exchange.EXCEPTION_CAUGHT, IllegalArgumentException.class); TestSupport.assertIsInstanceOf(IllegalArgumentException.class, cause.getCause()); assertEquals("@Section and/or @KeyValuePairDataField have not been defined !", cause.getMessage()); **/ } KR, Charles Moulliard Senior Enterprise Architect (J2EE, .NET, SOA) Apache Camel/ServiceMix Committer ******************************************************************* - Blog : http://cmoulliard.blogspot.com - Twitter : http://twitter.com/cmoulliard - Linkedlin : http://www.linkedin.com/in/charlesmoulliard