title: how to set custom ref-variable in gmock
body: <p>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:</p>
  <pre class="lang-cpp prettyprint-override"><code>class XXXClient {
  public:
      void QueryXXX(const Request&amp;, Response&amp;);
  }; 
  
  class XXXRunner {
  public:
      void DoSomething(XXXClient&amp;);
  };
  </code></pre>
  <p>There is a Client Class XXXRunner::DoSomething using XXXClient::QueryXXX, and I Want to mock XXXClient to test XXXRunner::DoSomething.</p>
  <p>The problem occurs that the second parameter of QueryXXX , that is 'Response', is not a return value, but a reference variable, which I fill some data into Response in  XXXClient::QueryXXX. I want to set a custom data for the Response to verify different condition of XXXRunner::DoSomething.</p>
  <p>The gmock framework can set expected returned value, but I cannot not find a way to set the &quot;returned variable&quot; ?</p>
  <p>So How to do so?</p>