When working on this fix I wanted to create a failing unit test to avoid any regression. [Note this bug is similar to a 4 year old Jira QPID-231].
I was puzzled that I could find virtually no unit tests at all for the JMS client code.
So I started to add one.
At first it seemed simple enough I'd create a connection object from a URL then create a QueueSession then a QueueSender.
When I did this I realised that the Connection needs to actually talk to the broker when you create it (to figure out which delegate to create 0_10 or 0_8 etc.) and so Ihad to have a broker running.
No problem I thought - the Java broker supports in memory brokers, it even has a coll URL syntax, how hard can it be?
Two hours later I realised why there are no unit tests for even the simple stuff in JMS - creating an in memory broker requires a whole chain of obscure stuff to be there. I even found a couple of references on the mailing list and in stackoverflow to indicate I wasn't the first to try this. There was no indication that anyone else had succeeded though.