[
https://issues.apache.org/jira/browse/CAMEL-4919?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407859#comment-13407859
]
Claus Ibsen commented on CAMEL-4919:
------------------------------------
You need a expectedHeadersReceivedInAnyOrder(key, values...)
> Testing headers in multiple messages
> -------------------------------------
>
> Key: CAMEL-4919
> URL: https://issues.apache.org/jira/browse/CAMEL-4919
> Project: Camel
> Issue Type: Improvement
> Components: camel-test
> Affects Versions: 2.9.0
> Reporter: Paul-Emmanuel Faidherbe
> Priority: Minor
> Labels: headers, messages, multiple
>
> The need is something similar to expectedBodiesReceivedInAnyOrder applied to
> headers :
> I know that a given endpoint will receive 3 messages in any order, and I need
> to test ONE header in each of these messages.
> I wrote :
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile",
> "001.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile",
> "002.zip");
> getMockEndpoint("mock:zipSHP").expectedHeaderReceived("zippedFile",
> "003.zip");
> for the route :
> for("file://filesToBeZipped/").to("bean:my.bean.ZipperBean").log("Zipped :
> ...");
> The endpoint effectively received the three messages (the results of three
> ZIP operations) but the test failed saying that the first message header was
> "003.zip" and not the expected "001.zip".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira