So, I am not sure I am heading towards the right direction, but this is what I have come up with the following:
@Test public void myTest() throws Exception { //Custom component has been instantiated outside the individual test String headerValue= MyComponent.VALUE; EmailAddress recipients = new EmailAddress("recipi...@example.com"); template.sendBodyAndHeader("activemq:topic:inbox", recipients.toString(), headerValue); resultEndpoint.assertIsSatisfied(); resultEndpoint.expectedBodiesReceived(recipients.toString()); resultEndpoint.expectedHeaderReceived("expected value from header", headerValue); resultEndpoint.expectedMessageCount(1); } The EmailAddress value is a constant in my Component. I am instantiating that component to get the value of that constant. Is it correct the way I am actually testing it on the mock endpoint? Thank you for your help, Ilaria -- View this message in context: http://camel.465427.n5.nabble.com/How-to-get-hold-of-the-content-of-log-message-tp5790064p5790108.html Sent from the Camel Development mailing list archive at Nabble.com.