title: How to ask RhinoMock to correctly expect a Lambda expression
body: <p>I am using Rhino Mocks and I'm not sure how to mock a call that takes a lambda expression.  Here's the situation:</p>
  
  <p>Actual Method:</p>
  
  <pre><code>public void MyMethod (int subtestId) {
  var interview = _repository.FindOne(t =&gt; t.Survey.Subtests.SingleOrDefault(x =&gt; x.Id == subtestId) != null);
  ...content elided...
  }
  </code></pre>
  
  <p>Mock attempt:</p>
  
  <pre><code>var interview = new Interview();
  _repository.Expect(r =&gt; r.FindOne(t =&gt; t.Survey.Subtests.SingleOrDefault(x =&gt; x.Id == subtestId) != null)).Return(interview);
  
   var viewModelRetrieved =  _service.MyMethod(subtestId);
  </code></pre>
  
  <p>When I run this and step through, var interview in MyMethod gets set to null.  The subtestId value is correct.</p>
  
  <p>Is there another way to do this?</p>