This'll probably require adding a Client interface and then writing a test client and having the tests make requests to it instead of a live instance.