Mock HTTP context in tests.