[+MK] Implement route tests and attempt to mock out the amqp library.

Also alter the code to allow for easier mocking of key functions such as date.