You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2022/04/12 11:38:57 UTC

[camel] branch main updated: CAMEL-17886: Fixed unit test as it was misleading

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new fa67fbc3564 CAMEL-17886: Fixed unit test as it was misleading
fa67fbc3564 is described below

commit fa67fbc3564aa206d325e1dce5a2b899a1375869
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Apr 12 13:37:01 2022 +0200

    CAMEL-17886: Fixed unit test as it was misleading
---
 .../test/java/org/apache/camel/component/mail/RawMailMessageTest.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java b/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
index ac39e31fe11..007588f1089 100644
--- a/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
+++ b/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java
@@ -97,7 +97,8 @@ public class RawMailMessageTest extends CamelTestSupport {
 
         MockEndpoint mock = getMockEndpoint("mock://rawMessage" + type);
         mock.expectedMessageCount(1);
-        mock.expectedBodyReceived().body().isNotNull();
+        mock.message(0).body().isNotNull();
+
         assertMockEndpointsSatisfied();
 
         Message mailMessage = mock.getExchanges().get(0).getIn().getBody(Message.class);