Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.9.0
-
Unknown
Description
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".