Thanks Claus

Makes much more sense now, when you know the overrides.

For completeness sake I just move the header test like ->

        public void testSomething() throws Exception {
                String xmlFile = FileUtils.readFileToString(new
File("src/test/data/good.xml"));
                MockEndpoint mockBar = getMockEndpoint("mock:bar");
                mockBar.expectedMessageCount(2);

                template.sendBodyAndHeader("file:target/input", xmlFile,
Exchange.FILE_NAME, "test_name_header.xml");

                assertMockEndpointsSatisfied();
                List<Exchange> receivedExchanges = 
mockBar.getReceivedExchanges();
                assertEquals(2, receivedExchanges.size());
                Message message1 = receivedExchanges.get(0).getIn();
        
assertTrue(message1.getBody(String.class).contains("<id>563516592469</id>"));
                assertEquals("563516592469", message1.getHeader("MessageID"));
                
                Message message2 = receivedExchanges.get(1).getIn();
        
assertTrue(message2.getBody(String.class).contains("<id>563516592470</id>"));
                assertEquals("563516592470", message2.getHeader("MessageID"));
        }

or the other way around




--
View this message in context: 
http://camel.465427.n5.nabble.com/Strange-side-effects-when-testing-with-expectedHeaderValuesReceivedInAnyOrder-tp5766203p5766234.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to