added and reorganized unit tests for BasicQueueTest and QueueListenerTest

I see this loop being copied a lot of times. If you really like it; make a function where the queue is filled with some predictable content. Copy/paste-programming, even for tests, is a big sin :)