camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Need an interceptSendTo hook
Date Fri, 22 Apr 2016 10:58:12 GMT
On Thu, Apr 21, 2016 at 8:18 PM, Jeff Segal <> wrote:
> I've got a route that I'd like to do some unit testing on at various
> stages. It does a few splits, sets some headers, etc. The problem is that
> there's no actual endpoint for me to intercept until the very end, but I'd
> like to do some verification midway through.
> I suppose I could add arbitrary mock endpoints in key spots to use as
> interceptSendTo hooks, but I'd rather not pollute my route with test
> scaffolding like that. I've also tried using vanilla intercept().when()
> calls but those end up casting too wide a net to be useful (or don't offer
> a straightforward way for to intercept where and only where I want to).
> Is there a better alternative to solving this problem than injecting
> arbitrary mocks into my production routes?

Can you provide an example. I think that would help understand what you explain.

> Jeff

Claus Ibsen
----------------- @davsclaus
Camel in Action 2:

View raw message