@SuppressWarnings("unchecked")
@Test
public void redeliverResult() {

    mLoader.onStartLoading();
    final ArgumentCaptor<ResultListener> captor = ArgumentCaptor.forClass(ResultListener.class);
    Mockito.verify(mPromise).then(Mockito.same(mUiThread), captor.capture());
    ResultListener listener = captor.getValue();
    Assert.assertNotNull(listener);
    listener.onResult("Test");
    // Check that result was delivered
    Assert.assertTrue(mResultCaptor.resultDelivered);
    Assert.assertEquals("Test", mResultCaptor.result);
    // Second call should redeliver result
    Mockito.reset(mActorImpl);
    mResultCaptor.result = null;
    mResultCaptor.resultDelivered = false;
    mLoader.onStartLoading();
    Mockito.verifyZeroInteractions(mActorImpl);
    // but result should be redelivered
    Assert.assertTrue(mResultCaptor.resultDelivered);
    Assert.assertEquals("Test", mResultCaptor.result);
}