MemoryQueue and Tests