user3279550
user3279550

Reputation: 108

Stub camel route bean reference for integration test

I have a camel route which has a bean pointing to a amazon wrapper class. That class is making an amazon call.

Ideally I would like to stub out the amazon call for the integration test.

However all I can think of is to put a split on the route to check for a particular flag. If the flag is positive then the code calls thr stub and if its negative then it calls actual amazon.

I really do not like this option as it is mixing production code with test code. Or is it ok in this scenario.

Upvotes: 0

Views: 125

Answers (1)

Andreas Aumayr
Andreas Aumayr

Reputation: 1006

You can use advices for this scenario..

If you need help with it, please Post an example Route that demonstrates your Problem.

Upvotes: 1

Related Questions