This is the sample code developed alongside my presentation Unit testing Messaging Applications delivered first at the Berlin Expert Days 2011-04.
All samples can be run from a Java IDE that supports maven, or from the command line using maven. To understand the samples running with an IDE is recommended, the tests are documented with javadoc, so you should really be looking at the code and not at this text.