test_class.declarator: mProxyFactory
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ProxyFactory mProxyFactory;
test_class.type: ProxyFactory
test_class.var_name: mProxyFactory
test_class.declarator: mFailureHandler
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private FailureHandler mFailureHandler;
test_class.type: FailureHandler
test_class.var_name: mFailureHandler
test_class.declarator: mProxy
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Runnable mProxy;
test_class.type: Runnable
test_class.var_name: mProxy
test_class.declarator: mLooper
test_class.modifier: private
test_class.original_string: private Looper mLooper;
test_class.type: Looper
test_class.var_name: mLooper
test_class.declarator: mShadowLooper
test_class.modifier: private
test_class.original_string: private ShadowLooper mShadowLooper;
test_class.type: ShadowLooper
test_class.var_name: mShadowLooper
test_class.declarator: mActorImpl
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Runnable mActorImpl;
test_class.type: Runnable
test_class.var_name: mActorImpl
test_class.file: actors-library/src/test/java/com/truecaller/androidactors/LooperActorThreadTest.java
test_class.identifier: LooperActorThreadTest
test_case.body: @SuppressWarnings("unchecked")
      @Test
      public void messageExceptionTest() throws Exception {
          final Throwable occurredException = new RuntimeException();
          final ActorMethodInvokeException baseCallException = Mockito.mock(ActorMethodInvokeException.class);
          final Message message = Mockito.mock(Message.class);
          Mockito.doThrow(occurredException).when(message).invoke(mActorImpl);
          //noinspection ThrowableNotThrown
          Mockito.doReturn(baseCallException).when(message).exception();
  
          final LooperActorThread actorThread = new LooperActorThread(mProxyFactory, mFailureHandler, mLooper);
          ActorRef<Runnable> runnableRef = actorThread.bind(Runnable.class, mActorImpl);
          Assert.assertSame(mProxy, runnableRef.tell());
  
          ArgumentCaptor<MessageSender> postmanCaptor = ArgumentCaptor.forClass(MessageSender.class);
          Mockito.verify(mProxyFactory).newProxy(Mockito.<Class>any(), postmanCaptor.capture());
  
          MessageSender postman = postmanCaptor.getValue();
          postman.deliver(message);
          // check that we did nothing on same thread
          Mockito.verify(message, Mockito.never()).invoke(Mockito.any());
          // Process all scheduled messages on looper thread and check that our actor's method was called
          mShadowLooper.runToEndOfTasks();
          // Check that exception was reported to FailureHandler
          Mockito.verify(mFailureHandler).onUncaughtException(mActorImpl, message, baseCallException);
          Mockito.verify(baseCallException).initCause(occurredException);
      }
test_case.class_method_signature: LooperActorThreadTest.messageExceptionTest()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void messageExceptionTest()
test_case.identifier: messageExceptionTest
test_case.invocations: mock mock invoke when doThrow exception when doReturn bind assertSame tell forClass newProxy verify any capture getValue deliver invoke verify never any runToEndOfTasks onUncaughtException verify initCause verify
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void messageExceptionTest()
focal_class.declarator: mFailureHandler
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final FailureHandler mFailureHandler;
focal_class.type: FailureHandler
focal_class.var_name: mFailureHandler
focal_class.declarator: mProxyFactory
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final ProxyFactory mProxyFactory;
focal_class.type: ProxyFactory
focal_class.var_name: mProxyFactory
focal_class.declarator: mLooper
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final Looper mLooper;
focal_class.type: Looper
focal_class.var_name: mLooper
focal_class.file: actors-library/src/main/java/com/truecaller/androidactors/LooperActorThread.java
focal_class.identifier: LooperActorThread
focal_class.interfaces: implements ActorThread
focal_class.class_method_signature: LooperActorThread.LooperActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                      @NonNull Looper looper)
focal_class.full_signature:   LooperActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                      @NonNull Looper looper)
focal_class.identifier: LooperActorThread
focal_class.parameters: (@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                      @NonNull Looper looper)
focal_class.signature:  LooperActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                      @NonNull Looper looper)
focal_class.class_method_signature: LooperActorThread.bind(@NonNull Class<T> cls, @NonNull T impl)
focal_class.full_signature: @NonNull @Override public ActorRef<T> bind(@NonNull Class<T> cls, @NonNull T impl)
focal_class.identifier: bind
focal_class.modifiers: @NonNull @Override public
focal_class.parameters: (@NonNull Class<T> cls, @NonNull T impl)
focal_class.return: ActorRef<T>
focal_class.signature: ActorRef<T> bind(@NonNull Class<T> cls, @NonNull T impl)
focal_method.body: @NonNull
      @Override
      public <T> ActorRef<T> bind(@NonNull Class<T> cls, @NonNull T impl) {
          MessageSender postman = new LooperMessageSender<>(mLooper, mFailureHandler, impl);
          T instance = mProxyFactory.newProxy(cls, postman);
          return new ActorRefImpl<>(instance);
      }
focal_method.class_method_signature: LooperActorThread.bind(@NonNull Class<T> cls, @NonNull T impl)
focal_method.full_signature: @NonNull @Override public ActorRef<T> bind(@NonNull Class<T> cls, @NonNull T impl)
focal_method.identifier: bind
focal_method.invocations: newProxy
focal_method.modifiers: @NonNull @Override public
focal_method.parameters: (@NonNull Class<T> cls, @NonNull T impl)
focal_method.return: ActorRef<T>
focal_method.signature: ActorRef<T> bind(@NonNull Class<T> cls, @NonNull T impl)