title: How to unit test production routes in Apache Camel?
body: <p>Let's say I have my routes created in separate RouteBuilder class. It looks like:</p>
  
  <ul>
  <li>grab message from JMS queue</li>
  <li>do some transformation, validation etc</li>
  <li>depending on validation results forward to specific JMS queue and save something in DB </li>
  </ul>
  
  <p>I'd like to unit test this route with no JMS broker and no DB. I know I can mock my Processor implementations but that's not enough. I don't want to change this route (let's suppose I got that class in jar file). As far as I know from Camel in Action (sec. 6.2.6), to be able to use mocks of endpoints and other stuff I need to change my route endpoint definitions (in book's example this is change of "mina:tcp://miranda" to "mock:miranda" etc).</p>
  
  <p>Is it possible to test the flow in complete isolation without changing route definitions?
  If I got my RouteBuilder as a separate class, am I forced to somehow "copy" route definition and change it manually? Isn't it testing the wrong thing?</p>
  
  <p>I'm quite new to Camel and for me it'd be really cool to be able to have isolated unit test while deveoping routes. Just to be able to change something, run small test, observe result and so on.</p>