Adds tests for closing the queue.