Test an exception is thrown when no queue is set