AMQ-3580: Added unit test