title: Testing self message send in Akka.NET
body: <p>I am new in Akka.NET, at moment I am having difficulty in test if my actor sent any message to himself.</p>
  
  <p>This is my actor code:</p>
  
  <pre class="lang-cs prettyprint-override"><code>public class MySuperActor : ReceiveActor
  {
      private readonly IActorRef _anotherActor;
  
      public RoteadorDeContratosSuspensoActor(IActorRef anotherActor)
      {
          _anotherActor = anotherActor;
          Receive&lt;MySuperActorMessage&gt;(m =&gt; HandleMessage(m));
          Receive&lt;MySuperActorSuperMessage&gt;(m =&gt; HandleSuperMessage(m));
      }
  
      private void HandleMessage(MySuperActorMessage message)
      {
          Self.Tell(new MySuperActorSuperMessage(message));
      }
  
      private void HandleSuperMessage(MySuperActorSuperMessage message)
      {
          _anotherActor.Tell(new AnotherActorMessage(message));
      }
  }
  </code></pre>
  
  <p>And that is my test code</p>
  
  <pre class="lang-cs prettyprint-override"><code>[TestFixture]
  public class MySuperActorTest : TestKit
  {
      private IActorRef _sut;
      private IActorFactory _actorFactory;
      private List&lt;Contrato&gt; _contratos;
      private Props _props;
  
      [Test]
      public void WhenReceiveASimpleMessageActorShouldSendSuperMessageToHimself()
      {
          var testProbe = CreateTestProbe();
          Props props = Props.Create&lt;MySuperActor&gt;(testProbe);
          var sut = ActorOf(_props);
          sut.Tell(new MySuperActorMessage());
  
          ExpectMsg&lt;MySuperActorSuperMessage&gt;();
      }
  }
  </code></pre>
  
  <p>My test always break with the following message:</p>
  
  <p><strong>Failed: Timeout 00:00:03 while waiting for a message of type AkkaNetTestPlaygroung.MySuperActorSuperMessage</strong></p>
  
  <p>How can I check if my actor is sending another message to himself?</p>