[ 
https://issues.apache.org/jira/browse/CAMEL-17886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-17886.
---------------------------------
    Resolution: Not A Bug

So the unit test was misleading and I have fixed that.

The exepectedBodyReceived() is intended for matching against an expression that 
provides the body to compare with.

What the test and you do is not correct, if you want to use predicates to say 
body is not null etc in that fluent style, then use message(0) or allMessages()

> MockValueBuilder behaves false positive
> ---------------------------------------
>
>                 Key: CAMEL-17886
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17886
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-mock
>    Affects Versions: 3.16.0
>            Reporter: Babak Vahdat
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 3.17.0
>
>
> If I change the following line:
> https://github.com/apache/camel/blob/camel-3.16.0/components/camel-mail/src/test/java/org/apache/camel/component/mail/RawMailMessageTest.java#L100
> To:
> {code}
> mock.expectedBodyReceived().body().isNull();
> mock.expectedBodyReceived().body().isEqualTo(new Object());
> {code}
> Then the test would still pass.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to