title: Moq does not return the value I set up
body: <p>I'm new to Moq. I'm trying to setup my Repository to return a value when called:</p>
  
  <p>My test method:</p>
  
  <pre><code> _userServiceMock.Setup(m =&gt; m.GetUserIDByUserName(It.IsAny&lt;string&gt;())).Returns(2);
   _bidRepositoryMock.Setup(m =&gt; m.Match(It.IsAny&lt;Func&lt;IQueryable&lt;Bid&gt;, object&gt;&gt;(),
                          It.IsAny&lt;Expression&lt;Func&lt;Bid, object&gt;&gt;[]&gt;())).Returns(new Bid{UserId = 2});
   var service = SetupService();
   var result = service.GetOwnBid(1, "testuser");
  </code></pre>
  
  <p>The userServiceMock returns 2 just as it should, but the bidRepositoryMock returns null.</p>
  
  <p>The Method I'm unit testing looks like this:</p>
  
  <pre><code>  var bid = _bidRepository.Match(userBid =&gt; userBid.SingleOrDefault(b =&gt; b.ID == id),
                  b =&gt; b.UserProfile,
                  b =&gt; b.Task.UserProfile);
  </code></pre>
  
  <p>and the BidRepository Method Match Looks like this:</p>
  
  <pre><code>TResult Match&lt;TResult&gt;(Func&lt;IQueryable&lt;T&gt;, TResult&gt; query, params Expression&lt;Func&lt;T, object&gt;&gt;[] includes);
  </code></pre>