title: How to Moq methods that return "this"
body: <p>I have an interface</p>
  
  <pre><code>interface IService
  {
      IService Configure();
      bool Run();
  }
  </code></pre>
  
  <p>The "real" implementation does this:</p>
  
  <pre><code>class RealService : IService
  {
      public IService Configure()
      {
          return this;
      }
  
      public bool Run()
      {
          return true;
      }
  }
  </code></pre>
  
  <p>Using Moq to mock the service creates a default implementation of <code>Configure()</code> that returns <code>null</code>.  </p>
  
  <p>Is there a way to setup methods in Moq that return the mocked instance?</p>