ActorCallLoader extends Loader<R> { @Override protected void onForceLoad() { if (mState == STATE_CALLING) { return; } doLoad(); } ActorCallLoader(@NonNull Context context, @NonNull ActorsThreads actors, @NonNull ActorRef<A> actorRef);   }
@SuppressWarnings("unchecked") @Test public void onForceLoad() { mLoader.onStartLoading(); Mockito.verify(mActorImpl, Mockito.times(1)).getResult(); mLoader.onForceLoad(); Mockito.verify(mActorImpl, Mockito.times(1)).getResult(); 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"); mLoader.onForceLoad(); Mockito.verify(mActorImpl, Mockito.times(2)).getResult(); }