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: mImpl
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Runnable mImpl;
test_class.type: Runnable
test_class.var_name: mImpl
test_class.declarator: mImplProxy
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Runnable mImplProxy;
test_class.type: Runnable
test_class.var_name: mImplProxy
test_class.declarator: mMessage
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Message mMessage;
test_class.type: Message
test_class.var_name: mMessage
test_class.declarator: mThreadFactory = new DefaultActorThread.ThreadFactory() {
          @Override
          public ActorHandlerBase createThread(Looper looper, long stopDelay) {
              return createHandler(stopDelay, null);
          }
      }
test_class.modifier: private
test_class.original_string: private DefaultActorThread.ThreadFactory mThreadFactory = new DefaultActorThread.ThreadFactory() {
          @Override
          public ActorHandlerBase createThread(Looper looper, long stopDelay) {
              return createHandler(stopDelay, null);
          }
      };
test_class.type: DefaultActorThread.ThreadFactory
test_class.var_name: mThreadFactory
test_class.file: actors-library/src/test/java/com/truecaller/androidactors/DefaultActorThreadTest.java
test_class.identifier: DefaultActorThreadTest
test_case.body: @SuppressWarnings("unchecked")
      @Test
      public void sendTransaction_sendToNewHandler_invalidHandlerExists() {
          DefaultActorThread thread = createThread();
          ActorHandlerBase handler = createHandler(-1, null);
  
          Mockito.doReturn(false).when(handler).sendTransaction(Mockito.<Transaction>any());
  
          thread.mHandler = handler;
  
          Transaction transaction = Transaction.<Object>obtain(mImpl, mMessage, mFailureHandler);
          thread.sendTransaction(transaction);
  
          Mockito.verify(thread.mHandler).sendTransaction(transaction);
          Assert.assertNotSame(handler, thread.mHandler);
      }
test_case.class_method_signature: DefaultActorThreadTest.sendTransaction_sendToNewHandler_invalidHandlerExists()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void sendTransaction_sendToNewHandler_invalidHandlerExists()
test_case.identifier: sendTransaction_sendToNewHandler_invalidHandlerExists
test_case.invocations: createThread createHandler sendTransaction when doReturn any obtain sendTransaction sendTransaction verify assertNotSame
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void sendTransaction_sendToNewHandler_invalidHandlerExists()
focal_class.declarator: mThreadFactory
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final ThreadFactory mThreadFactory;
focal_class.type: ThreadFactory
focal_class.var_name: mThreadFactory
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: mThreadName
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final String mThreadName;
focal_class.type: String
focal_class.var_name: mThreadName
focal_class.declarator: mStopDelay
focal_class.modifier: private final
focal_class.original_string: private final long mStopDelay;
focal_class.type: long
focal_class.var_name: mStopDelay
focal_class.declarator: mHandler
focal_class.modifier: @VisibleForTesting
      @Nullable
focal_class.original_string: @VisibleForTesting
      @Nullable
      /* package */ ActorHandlerBase mHandler;
focal_class.type: ActorHandlerBase
focal_class.var_name: mHandler
focal_class.file: actors-library/src/main/java/com/truecaller/androidactors/DefaultActorThread.java
focal_class.identifier: DefaultActorThread
focal_class.interfaces: implements ActorThread
focal_class.class_method_signature: DefaultActorThread.DefaultActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                       @NonNull String threadName)
focal_class.full_signature:   DefaultActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                       @NonNull String threadName)
focal_class.identifier: DefaultActorThread
focal_class.parameters: (@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                       @NonNull String threadName)
focal_class.signature:  DefaultActorThread(@NonNull ProxyFactory proxyFactory, @NonNull FailureHandler failureHandler,
                                       @NonNull String threadName)
focal_class.class_method_signature: DefaultActorThread.DefaultActorThread(@NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.full_signature:   DefaultActorThread(@NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.identifier: DefaultActorThread
focal_class.parameters: (@NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.signature:  DefaultActorThread(@NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.class_method_signature: DefaultActorThread.DefaultActorThread(@NonNull ThreadFactory threadFactory, @NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.full_signature: @VisibleForTesting  DefaultActorThread(@NonNull ThreadFactory threadFactory, @NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.identifier: DefaultActorThread
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (@NonNull ThreadFactory threadFactory, @NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.signature:  DefaultActorThread(@NonNull ThreadFactory threadFactory, @NonNull ProxyFactory proxyFactory,
                                       @NonNull FailureHandler failureHandler, @NonNull String threadName, long stopDelay)
focal_class.class_method_signature: DefaultActorThread.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_class.class_method_signature: DefaultActorThread.sendTransaction(@NonNull Transaction transaction)
focal_class.full_signature: @VisibleForTesting void sendTransaction(@NonNull Transaction transaction)
focal_class.identifier: sendTransaction
focal_class.modifiers: @VisibleForTesting
focal_class.parameters: (@NonNull Transaction transaction)
focal_class.return: void
focal_class.signature: void sendTransaction(@NonNull Transaction transaction)
focal_class.class_method_signature: DefaultActorThread.stopThread(@NonNull Looper looper)
focal_class.full_signature: private void stopThread(@NonNull Looper looper)
focal_class.identifier: stopThread
focal_class.modifiers: private
focal_class.parameters: (@NonNull Looper looper)
focal_class.return: void
focal_class.signature: void stopThread(@NonNull Looper looper)
focal_method.body: @VisibleForTesting
      /* package */ void sendTransaction(@NonNull Transaction transaction) {
          ActorHandlerBase handler = mHandler;
          if (handler != null && handler.sendTransaction(transaction)) {
              return;
          }
  
          synchronized (this) {
              if ((handler = mHandler) != null && handler.sendTransaction(transaction)) {
                  return;
              }
  
              // start thread and schedule transaction
              HandlerThread thread = new HandlerThread(mThreadName);
              thread.start();
  
              mHandler = mThreadFactory.createThread(thread.getLooper(), mStopDelay);
              mHandler.sendTransaction(transaction);
          }
      }
focal_method.class_method_signature: DefaultActorThread.sendTransaction(@NonNull Transaction transaction)
focal_method.full_signature: @VisibleForTesting void sendTransaction(@NonNull Transaction transaction)
focal_method.identifier: sendTransaction
focal_method.invocations: sendTransaction sendTransaction start createThread getLooper sendTransaction
focal_method.modifiers: @VisibleForTesting
focal_method.parameters: (@NonNull Transaction transaction)
focal_method.return: void
focal_method.signature: void sendTransaction(@NonNull Transaction transaction)