Additional fixes to tests and MockRequest.