title: How to moq a service call in a method which is returning an object of abstract class?
body: <p>I want to MOQ a service call in method for which I am writing unit test methods.</p>
  
  <p>For example:</p>
  
  <pre><code>public void MethodUnderTest(data)
  {
     XYZService.ServiceMethod(data);
  }
  </code></pre>
  
  <p>The above service method returns an object of an abstract class(Lets say ClassA). i.e</p>
  
  <pre><code>    public ClassA ServiceMethod(ClassA data)
      {
           //code
      }
  
  
   public abstract class ClassA
      {
           //Code
      }
  </code></pre>
  
  <p>Now, if I write moq for above test in my test class as :</p>
  
  <blockquote>
    <p>_xyzService.setup(x => x.ServiceMethod(data)).Returns(<strong>?</strong>);</p>
  </blockquote>
  
  <p>If I write <strong>new ClassA()</strong> in place of <strong>?</strong>, I am not supposed to do that as class is abstract!</p>
  
  <p>So, What should I place in Return?</p>