Normally I'd say simply mock the Request object and make it return values. But since the Request object is static it's not possible.