[ 
https://issues.apache.org/jira/browse/CAMEL-20020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151618#comment-18151618
 ] 

Claus Ibsen commented on CAMEL-20020:
-------------------------------------

MockEndpoint already accepts lambdas for custom checks: 
`expectedMessagesMatches(Predicate...)`
(`e -> e.getMessage().getBody(String.class).contains("x")`), 
`expects(Runnable)` and `whenAnyExchangeReceived`.
This ticket was a general "see what could be added" with no concrete API, and 
the PR it referenced (#11785) was
closed. Closing as Won't Fix; a specific missing assertion can be filed as its 
own ticket.

_Claude Code on behalf of davsclaus_

> camel-mock - APIs for expecting body/header for Java lambda style
> -----------------------------------------------------------------
>
>                 Key: CAMEL-20020
>                 URL: https://issues.apache.org/jira/browse/CAMEL-20020
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-mock
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 4.x
>
>
> There is already a bunch of methods for expectedXXX, and message(i).xxx.
> Instead of some ad-hoc here and there in contributor PRs, then a general work 
> must be done to look at what APIs can be added to benefit some use-cases 
> where Camel users can do body/header checks from custom Java code via Lambdas 
> or supplier etcs.
> https://github.com/apache/camel/pull/11785



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to