https://issues.apache.org/jira/browse/AMQ-5222

Add test to show this is working as it should.