Test for https://issues.apache.org/jira/browse/AMQ-5290
Updated test for https://issues.apache.org/jira/browse/AMQ-5290 after tbish commit for enhancement.