Why is this code necessary in the tests? Isn't the ReqContext supposed to be managed automatically by the underlying Thrift components (as you do in TUGIWrapProcessor)? If not, then I think the ReqContext should only contain the stuff that can be filled in automatically by the underlying Thrift transport, and the rest of the information should be passed to the authorizer as another immutable argument.