title: Moq: How to setup a method with tupel having type T as tupel element
body: <p>I am using Moq 4.18.1. I have to setup a mock for the following method signature:</p>
  <pre><code>Task AddMultiMessagesWithTransactionAsync&lt;T&gt;(List&lt;(string queueName, T content, string messageId)&gt; messageInfos, bool createQueue = false) where T : class;
  </code></pre>
  <p>The special thing is the generic type inside the tupel, which is at the first parameter. And I think there lies the problem. Other mock-setups in the same project are working fine. The mock looks like:</p>
  <pre><code>Mock&lt;IServiceBusService&gt; sbSrvMock2 = new();
  var messageInfos = It.IsAny&lt;List&lt;(string queueName, It.IsAnyType content, string messageId)&gt;&gt;();
  var createQueue = It.IsAny&lt;bool&gt;();
  sbSrvMock2
      .Setup(sb =&gt; sb.AddMultiMessagesWithTransactionAsync&lt;It.IsAnyType&gt;(messageInfos, createQueue))
      .Callback(new InvocationAction((inv) =&gt;
      {
          var p1 = inv.Arguments[0];
          var p2 = inv.Arguments[1];
          Console.WriteLine(&quot;I was here&quot;);
      }));
  </code></pre>
  <p>The callback is never triggered! Do I have a problem with setting up the signature? Is it something with async?</p>