<p>I am using this code to verify a behavior of a method I am testing:</p>

<pre><code>    _repository.Expect(f =&gt; f.FindAll(t =&gt; t.STATUS_CD == "A"))
    .Returns(new List&lt;JSOFile&gt;())
    .AtMostOnce()
    .Verifiable();
</code></pre>

<p>_repository is defined as:</p>

<pre><code>private Mock&lt;IRepository&lt;JSOFile&gt;&gt; _repository;
</code></pre>

<p>When my test is run, I get this exception:</p>

<p><strong>Expression t => (t.STATUS_CD = "A") is not supported.</strong></p>

<p>Can someone please tell me how I can test this behavior if I can't pass an expression into the Expect method?</p>

<p>Thanks!!</p>

In Rhino Mocks you would do something like this...
Instead of using an Expect, use a Stub and Ignore the arguments.  Then have --
```
```
Func<JSOFile, bool> _myDelegate;

_repository.Stub(f => FindAll(null)).IgnoreArguments()
   .Do( (Func<Func<JSOFile, bool>, IEnumerable<JSOFile>>) (del => { _myDelegate = del; return new List<JSOFile>();});
```
```
Call Real Code
*Setup a fake JSOFile object with STATUS_CD set to "A" *
```
```
Assert.IsTrue(_myDelegate.Invoke(fakeJSO));
```
```