Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c9fabc77 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c9fabc77 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c9fabc77 Branch: refs/heads/camel-2.16.x Commit: c9fabc77e75bd1c2c471e72f73e48fc14c728439 Parents: 9344aa8 Author: Claus Ibsen <davscl...@apache.org> Authored: Sun Jan 10 11:17:04 2016 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun Jan 10 11:17:23 2016 +0100 ---------------------------------------------------------------------- .../camel/dataformat/tarfile/TarFileDataFormatTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/c9fabc77/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java ---------------------------------------------------------------------- diff --git a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java index 39ebb4b..fa9bba8 100644 --- a/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java +++ b/components/camel-tarfile/src/test/java/org/apache/camel/dataformat/tarfile/TarFileDataFormatTest.java @@ -70,12 +70,16 @@ public class TarFileDataFormatTest extends CamelTestSupport { @Test public void testTarWithFileName() throws Exception { - getMockEndpoint("mock:tar").expectedBodiesReceived(getTaredText("poem.txt")); - getMockEndpoint("mock:tar").expectedHeaderReceived(FILE_NAME, "poem.txt.tar"); + MockEndpoint mock = getMockEndpoint("mock:tar"); + mock.expectedMessageCount(1); + mock.expectedHeaderReceived(FILE_NAME, "poem.txt.tar"); template.sendBodyAndHeader("direct:tar", TEXT, FILE_NAME, "poem.txt"); assertMockEndpointsSatisfied(); + + Exchange exchange = mock.getReceivedExchanges().get(0); + assertTrue(ObjectHelper.equalByteArray(getTaredText("poem.txt"), (byte[]) exchange.getIn().getBody())); } @Test