Allowing request.xml and response.json to be optional for tests.