@SuppressWarnings("unchecked")
@Test
public void deliver_deliverMessage_always() throws Exception {

    ActorService service = createService();
    IBinder binder = service.onBind(new Intent());
    ActorService.RemoteMessageSender sender = (ActorService.RemoteMessageSender) binder.queryLocalInterface(ActorService.LOCAL_SENDER_INTERFACE);
    sender.deliver(Transaction.<Object>obtain(mImpl, mMessage, mFailureHandler));
    ShadowLooper shadowLooper = Shadows.shadowOf(service.mThread.getLooper());
    shadowLooper.runOneTask();
    Mockito.verify(mMessage).invoke(mImpl);
    Assert.assertEquals(false, Shadows.shadowOf(service).isStoppedBySelf());
}