@Test
public void disposeAllScheduledDisposablesAfterSendingMessageToRegisteredActor() throws Exception {

    final ActorSystemInstance actorSystem = ActorSystemInstance
            .getInstance("disposeAllScheduledDisposablesAfterSendingMessageToRegisteredActor");
    new TestAsync<Void>().apply(new Function<CountDownLatch, Void>() {
        @Override
        public Void apply(@NonNull CountDownLatch countDownLatch) {
            MockActorTwo actor = new MockActorTwo(countDownLatch);
            actorSystem.register(actor);
            ActorScheduler.after(10, actorSystem).send(message, MockActorTwo.class);
            return null;
        }
    });
    actorSystem.unregister(MockActorTwo.class);
    assertTrue(ActorScheduler.schedules.get(MockActorTwo.class) == null);
}