Added unit tests for the Queue class. 

 Also minor refactoring to make testing easier.

References: https://www.pivotaltracker.com/story/show/63985256