2009/1/14 cmoulliard <cmoulli...@gmail.com>: > > The error is solved. > > Question : > > Why the template.sendBody(Object) must be placed in the code after the > MockEndpoint.expectedBodiesReceived() and not the inverse ? > > this code works : > > resultEndpoint.expectedBodiesReceived(result); > template.sendBody(generateModel()); > > Not this one > > template.sendBody(generateModel() > resultEndpoint.expectedBodiesReceived(result);
Up to now we've been assuming you setup the expectations before running your route. It could be MockEndpoint needs further patches to ensure it can cope with expectations being added after messages arrive on it -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/