test_class.declarator: mResult = new Object()
test_class.modifier: private final
test_class.original_string: private final Object mResult = new Object();
test_class.type: Object
test_class.var_name: mResult
test_class.declarator: mCleaner
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResourceCleaner<Object> mCleaner;
test_class.type: ResourceCleaner<Object>
test_class.var_name: mCleaner
test_class.declarator: mActorThread
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ActorThread mActorThread;
test_class.type: ActorThread
test_class.var_name: mActorThread
test_class.declarator: mListener
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultListener<Object> mListener;
test_class.type: ResultListener<Object>
test_class.var_name: mListener
test_class.declarator: mProxy
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private ResultListener<Object> mProxy;
test_class.type: ResultListener<Object>
test_class.var_name: mProxy
test_class.declarator: mActorRef = new ActorRef<ResultListener<Object>>() {
          @Override
          public ResultListener<Object> tell() {
              return mProxy;
          }
      }
test_class.modifier: private
test_class.original_string: private ActorRef<ResultListener<Object>> mActorRef = new ActorRef<ResultListener<Object>>() {
          @Override
          public ResultListener<Object> tell() {
              return mProxy;
          }
      };
test_class.type: ActorRef<ResultListener<Object>>
test_class.var_name: mActorRef
test_class.declarator: mCaptor
test_class.modifier: @Captor
      private
test_class.original_string: @Captor
      private ArgumentCaptor<ResultListener<Object>> mCaptor;
test_class.type: ArgumentCaptor<ResultListener<Object>>
test_class.var_name: mCaptor
test_class.file: actors-library/src/test/java/com/truecaller/androidactors/PromiseImplTest.java
test_class.identifier: PromiseImplTest
test_case.body: @Test
      public void ResultListener_nonNull_exception() {
          PromiseImpl<Object> promise = new PromiseImpl<>(mResult, mCleaner);
          promise.then(mActorThread, mListener);
  
          Mockito.verify(mActorThread).bind(Mockito.same(ResultListener.class), mCaptor.capture());
  
          ResultListener listener = mCaptor.getValue();
          Assert.assertTrue(listener instanceof ExceptionTemplateProvider);
          Assert.assertNotNull(((ExceptionTemplateProvider) listener).exception());
      }
test_case.class_method_signature: PromiseImplTest.ResultListener_nonNull_exception()
test_case.full_signature: @Test public void ResultListener_nonNull_exception()
test_case.identifier: ResultListener_nonNull_exception
test_case.invocations: then bind verify same capture getValue assertTrue assertNotNull exception
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void ResultListener_nonNull_exception()
focal_class.declarator: mInvokeException
focal_class.modifier: @NonNull
      private final
focal_class.original_string: @NonNull
      private final ActorCallbackInvokeException mInvokeException;
focal_class.type: ActorCallbackInvokeException
focal_class.var_name: mInvokeException
focal_class.declarator: mResult
focal_class.modifier: @Nullable
      private volatile
focal_class.original_string: @Nullable
      private volatile R mResult;
focal_class.type: R
focal_class.var_name: mResult
focal_class.declarator: mCleaner
focal_class.modifier: @Nullable
      private
focal_class.original_string: @Nullable
      private ResourceCleaner<R> mCleaner;
focal_class.type: ResourceCleaner<R>
focal_class.var_name: mCleaner
focal_class.file: actors-library/src/main/java/com/truecaller/androidactors/PromiseImpl.java
focal_class.identifier: PromiseImpl
focal_class.interfaces: implements ActionHandle
focal_class.class_method_signature: PromiseImpl.PromiseImpl(@Nullable R result, @Nullable ResourceCleaner<R> cleaner)
focal_class.full_signature:   PromiseImpl(@Nullable R result, @Nullable ResourceCleaner<R> cleaner)
focal_class.identifier: PromiseImpl
focal_class.parameters: (@Nullable R result, @Nullable ResourceCleaner<R> cleaner)
focal_class.signature:  PromiseImpl(@Nullable R result, @Nullable ResourceCleaner<R> cleaner)
focal_class.class_method_signature: PromiseImpl.thenNothing()
focal_class.full_signature: @Override public void thenNothing()
focal_class.identifier: thenNothing
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void thenNothing()
focal_class.class_method_signature: PromiseImpl.then(@Nullable ResultListener<R> listener)
focal_class.full_signature: @NonNull @Override public ActionHandle then(@Nullable ResultListener<R> listener)
focal_class.identifier: then
focal_class.modifiers: @NonNull @Override public
focal_class.parameters: (@Nullable ResultListener<R> listener)
focal_class.return: ActionHandle
focal_class.signature: ActionHandle then(@Nullable ResultListener<R> listener)
focal_class.class_method_signature: PromiseImpl.then(@NonNull ActorThread thread, @Nullable ResultListener<R> listener)
focal_class.full_signature: @NonNull @Override public ActionHandle then(@NonNull ActorThread thread, @Nullable ResultListener<R> listener)
focal_class.identifier: then
focal_class.modifiers: @NonNull @Override public
focal_class.parameters: (@NonNull ActorThread thread, @Nullable ResultListener<R> listener)
focal_class.return: ActionHandle
focal_class.signature: ActionHandle then(@NonNull ActorThread thread, @Nullable ResultListener<R> listener)
focal_class.class_method_signature: PromiseImpl.get()
focal_class.full_signature: @Nullable @Override public R get()
focal_class.identifier: get
focal_class.modifiers: @Nullable @Override public
focal_class.parameters: ()
focal_class.return: R
focal_class.signature: R get()
focal_class.class_method_signature: PromiseImpl.forget()
focal_class.full_signature: @Override public void forget()
focal_class.identifier: forget
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void forget()
focal_class.superclass: extends Promise<R>
focal_method.body: @NonNull
      @Override
      public ActionHandle then(@Nullable ResultListener<R> listener) {
          final R result = mResult;
          final ResourceCleaner<R> cleaner = mCleaner;
          mResult = null;
  
          if (listener != null) {
              listener.onResult(result);
          } else if (cleaner != null && result != null) {
              cleaner.clean(result);
          }
  
          mResult = null;
          mCleaner = null;
          return this;
      }
focal_method.class_method_signature: PromiseImpl.then(@Nullable ResultListener<R> listener)
focal_method.full_signature: @NonNull @Override public ActionHandle then(@Nullable ResultListener<R> listener)
focal_method.identifier: then
focal_method.invocations: onResult clean
focal_method.modifiers: @NonNull @Override public
focal_method.parameters: (@Nullable ResultListener<R> listener)
focal_method.return: ActionHandle
focal_method.signature: ActionHandle then(@Nullable ResultListener<R> listener)