I am using gmock in my project and I meet a problem to set a custom reference variable for a mock function. Suppose I have a class as following:
class XXXCli
Check out the SetArgReferee in the Google Mock cheat sheet.
SetArgReferee