Hello. In our unit tests we use CamelBlueprintTestSupport. Almost all the objects our routes depend on are OSGi services that are provided on "addServicesOnStartup", either with real classes, or mocks (Mockito).
Only for the unit test I need to add a simple bean (in fact, an EventNotifier) to help tracking and checking the exact path of exchanges on asynchronous routes. I've added it as a service, and it seems to work. Well ! Is there a better place to add beans to the CamelContext. It seems that adding the bean in "doPostSetUp" is too late, and the Camel context doesn't take my event notifier into account... Thanks for your help. Regards.