Trust me, I have googled and tried a lot of scenarios for a couple days. I have a javax.jms.messagelistener and I would like to JUnit test it. Last, I have tried with the JUnit rule EmbeddedActiveMQBroker but when I pass a messagelistener to the ActiveMQSession.createConsumer then I get:
javax.jms.IllegalStateException: Cannot synchronously receive a message when a MessageListener is set
The second step is I want to be able to use a javaee interceptor on the messagelistener and I would like to JUnit test this also.
If this must be done as an integration test (as I suspect) and working example with whatever open source broker or container will be acceptable.