title: Masstransit Consumer Unit Test sometimes has empty messages, with rabbit Mq backend it works
body: <p>I'm using xunit unit tests to test the MassTransit consumers, in most cases it works but in some cases the &quot;context.message&quot; in the consumer is filled with an object containing empty properties. (all string are null, guid is 000-0000.. etc.) The unit tests compared between running and not running tests looks identical.</p>
  <p>a) Command (Message)</p>
  <pre><code>public record UpdateKontakteintragCommand : ApplicationCommandRequest
  {
      public string Bemerkung { get; init; }
  
      public Guid Id { get; set; }
  
      // TODO: Fallaktenzuordnungsdatum
  }
  </code></pre>
  <p>b) Unit Test:</p>
  <pre><code>    [Fact]
      public async Task UpdateKontakteintrag_Complete_AcceptedMessage()
      {
          var consumer = harness.Consumer(() =&gt; new UpdateKontakteintragCommandConsumer(kontakteintragRep));
  
          await harness.Start();
  
          try
          {
              var requestClient = await harness.ConnectRequestClient&lt;UpdateKontakteintragCommand&gt;();
  
              var command = new UpdateKontakteintragCommand { Id = nonDeletedGuid, Bemerkung = &quot;abc&quot;, };
  
              await requestClient.GetResponse&lt;AcceptedResponse, FaultedResponse&gt;(command);
  
              Assert.True(consumer.Consumed.Select&lt;UpdateKontakteintragCommand&gt;().Any());
              Assert.True(harness.Sent.Select&lt;AcceptedResponse&gt;().Any());
          }
          finally
          {
              await harness.Stop();
          }
      }
  </code></pre>
  <p>c) Consumer</p>
  <pre><code>public class UpdateKontakteintragCommandConsumer : IConsumer&lt;UpdateKontakteintragCommand&gt;
  {
      private readonly IKontakteintraegeDomainRepository kontakteintragRepository;
  
      public UpdateKontakteintragCommandConsumer(IKontakteintraegeDomainRepository kontakteintragRepository)
          =&gt; this.kontakteintragRepository = kontakteintragRepository;
  
      public async Task Consume(ConsumeContext&lt;UpdateKontakteintragCommand&gt; context)
      {
          var kontakteintrag = kontakteintragRepository.Get(context.Message.Id);
  </code></pre>
  <p>No the &quot;context.Message.Id&quot; is 0000-0000 ... but in the unit test it is definitly set. Any ideas?</p>