camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From catequil <>
Subject Re: Camel Spring Unit Testing with Mocks
Date Fri, 14 Oct 2016 17:06:59 GMT
Ok, so it appears that I understand and have a working copy.  There are
however a few remaining questions.  If you feel they are no longer relevant
in this thread let me know and I will create a new thread.

In the code below I expected it to grab the "myRouteMiddle" route and find
the endpoint(direct:end) intercept it and mock the direct:end as

In the assertions I expected it to to have a body of "peace world!", but the
test passed with a body of "hello world!".

Am I misunderstanding how the intercepts and/or getRouteDefinition work?

On a second issue I intercepted "log:input" and the test failed saying there
were 3 messages.  I expected it to only have one based on the following
1. the "skipSendToOriginalEndpoint" should have stopped the last "log:input"
from being activated.
2. the getRouteDefinition was set to get "myMiddleRoute" which in my mind
should have gotten just the middle route and not the start route making the
total messages just 1.

Do you know why this works this way?  Is this a bug?  Or am I miss
understanding how it works?


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message