title: In gmock, Is there a way to have mock object return an instance of an user defined object?
body: <p>For UT purposes, I am trying to Mock out a function that returns a vector of user defined structs. </p>
  
  <pre><code>std::vector&lt;myStruct&gt; myClass::foo()
  </code></pre>
  
  <p>In gmock, Is there a way to do something like this:</p>
  
  <pre><code> std::vector&lt;myStruct&gt; TestVector;
   //code to populate my vector ....
  
   ON_CALL(MockMyClass, foo()).WillByDefault(Return(TestVector))
  </code></pre>
  
  <p>I couldn't find anything in the gmock cookbook, it looks like the return values are all primitives. Thanks</p>