add unit tests to Queue ready for some refactoring.