title: How do I mock an overloaded function with const/non
body: <p>How do I mock the following code?</p>
  
  <pre><code>class ISomeClass
  {
  public:
     virtual ~ISomeClass() {} = 0;
     virtual const MyType &amp; getType() const = 0;
     virtual MyType &amp; getType() = 0;
  };
  </code></pre>
  
  <p>I have tried the following, but it doesn´t work. Can you please help me?</p>
  
  <pre><code>class MockSomeClass : public ISomeClass
  {
  public:
      using MyTypeConstRefType = const MyType&amp;;
      using MyTypeRefType = MyType&amp;;
  
  public:
      MOCK_METHOD0(getType, MyTypeConstRefType(void) const);
  
      MOCK_METHOD0(getType, MyTypeRefType(void));
  };
  </code></pre>