title: moq objects Returns method, should return a null object
body: <p>I'm developing a Web API, and one of the test I came up with is that, if client makes a GET operation with a Physical Test ID (Physical Test is the resource I'm looking for) and that physical test is not found, the web API should return a 404 status.</p>
  
  <p>Now, I'm using moq framework for my tests and I have the following code:</p>
  
  <pre><code>[TestMethod]
  public void then_if_physical_test_not_found_return_not_found_status()
  {
      var unitOfWork = new Mock&lt;IUnitOfWork&gt;();
      var repository = new Mock&lt;IRepository&lt;PhysicalTest&gt;&gt;();
      repository.Setup(r =&gt; r.FindById(It.IsAny&lt;int&gt;())).Returns();
      unitOfWork.Setup(m =&gt; m.PhysicalTests).Returns(repository.Object);
      var pt = new PhysicalTestResource(unitOfWork.Object);
      HttpResponseMessage&lt;PhysicalTest&gt; response = pt.GetPhysicalTest(43);
      Assert.AreEqual(HttpStatusCode.NotFound, response.StatusCode)
  }
  </code></pre>
  
  <p>I need the Returns() method to return a null object, which is going to be what the actual API method would return if the resource is not found.</p>
  
  <p>I tried sending null as a parameter in the Returns() method but had no success.</p>