@Test
public void sendTheSameMessageTwiceBeforeTheFirstOneReceivedAndIgnoreTheSecond() throws Exception {

    final ActorSystemInstance actorSystem = ActorSystemInstance
            .getInstance("sendTheSameMessageTwiceBeforeTheFirstOneReceivedAndIgnoreTheSecond");
    MockActor actor = new TestAsync<MockActor>().apply(new Function<CountDownLatch, MockActor>() {
        @Override
        public MockActor apply(@NonNull CountDownLatch countDownLatch) {
            Message message = new Message(1, 1);
            Message messageTwo = new Message(1, 2);
            MockActorNine actor = new MockActorNine(countDownLatch);
            actorSystem.register(actor);
            ActorScheduler.after(50, actorSystem).send(message, MockActorNine.class);
            ActorScheduler.after(20, actorSystem).send(messageTwo, MockActorNine.class);
            return actor;
        }
    });
    actorSystem.unregister(MockActorNine.class);
    assertTrue(actor.message.getContent().equals(1));
}