title: Unsupported expression: Non-overridable members (here: ) may not be used in setup / verification expressions
body: <p>I am using xUnit and Moq for writing test cases. I am using the code below to create a Mock but am getting the highlighted issue.</p>
  <p><a href="https://i.stack.imgur.com/MvG34.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MvG34.png" alt="Picture of code and error pasted below" /></a></p>
  <pre><code>CloudBlockBlob source = null;
  AccessCondition sourceAccessCondition = null;
  AccessCondition destAccessCondition = null;
  BlobRequestOptions options = null;
  OperationContext operationContext = null;
  CloudBlobContainer container = new CloudBlobContainer(uri);
  Task task = null;
  DeleteSnapshotOption deleteSnapshotOption = new DeleteSnapshotOption();
  
  var mockCloudBlobClient = new Mock&lt;Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient&gt;();
  mockCloudBlobClient.Setup(repo =&gt; repo.GetContainerReference(&quot;sample&quot;)).Returns(container);
  
  var mockCloudBlobContainer = new Mock&lt;Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer&gt;(uri);
  mockCloudBlobContainer.Setup(repo =&gt; repo.GetBlockBlobReference(&quot;sample&quot;)).Returns(new CloudBlockBlob(uri));
  
  var mockBlobServiceProvider = new Mock&lt;BlobServiceProvider&gt;();
  mockBlobServiceProvider.Setup(repo =&gt; repo.GetBlockBlobContainer(&quot;sample&quot;)).Returns(new CloudBloblContainer(new Uri(&quot;http://mytest&quot;)));
  </code></pre>
  <p>The line <code>mockBlobServiceProvider.Setup(repo =&gt; repo.GetBlockBlobContainer(&quot;sample&quot;)).Returns(new CloudBloblContainer(new Uri(&quot;http://mytest&quot;)));</code> is giving me this error:</p>
  <blockquote>
  <p>System.NotSupportedException: 'Unsupported expression: repo =&gt; repo.GetBlockBlobContainer(&quot;sample&quot;)</p>
  <p>Non-overridable members (here: BlobServiceProvider.GetBlockBlobContainer) may not be used in setup / verification expressions.'</p>
  </blockquote>
  <p>Class <code>BlobServiceProvider</code>:</p>
  <pre><code>Public Class BlobServiceProvider
  {
      public CloudBlobContainer GetBlockBlobContainer(string containerName)
      {
          CloudBlobContainer Container = blobClient.GetContainerReference(containerName);
          Container.CreateIfNotExistsAsync();
          return Container;
      }
  }
  </code></pre>
  <p>How can I resolve this issue?</p>