Re: How to get hold of the content of log:message

2016-11-14 Thread idioma
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= MyComponen

Re: How to get hold of the content of log:message

2016-11-14 Thread idioma
Claus, thanks for this, but I should have clarified it a bit better. I wrote already a JUNIT test that checks the content of the logs as written out to a file and it is included in a separate test class. My question, I guess, was more about how I can include the testing of the message when I am alr

Re: How to get hold of the content of log:message

2016-11-11 Thread Claus Ibsen
Maybe just test the mock endpoint gets a header with key EmailAddress and the expected value. The Camel log should work. You don't go around testing log4j or JDK util classes etc. Otherwise if you want to test log its a lot of pain to mock them with mockito or powermock or something. Or you can c