test_class.file: rxjava/src/test/java/io/reactivex/internal/operators/observable/ObservableFromCallableTest.java
test_class.identifier: ObservableFromCallableTest
test_case.body: @SuppressWarnings("unchecked")
      @Test
      public void shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission() throws Exception {
          Callable<String> func = mock(Callable.class);
  
          final CountDownLatch funcLatch = new CountDownLatch(1);
          final CountDownLatch observerLatch = new CountDownLatch(1);
  
          when(func.call()).thenAnswer(new Answer<String>() {
              @Override
              public String answer(InvocationOnMock invocation) throws Throwable {
                  observerLatch.countDown();
  
                  try {
                      funcLatch.await();
                  } catch (InterruptedException e) {
                      // It's okay, unsubscription causes Thread interruption
  
                      // Restoring interruption status of the Thread
                      Thread.currentThread().interrupt();
                  }
  
                  return "should_not_be_delivered";
              }
          });
  
          Observable<String> fromCallableObservable = Observable.fromCallable(func);
  
          Observer<Object> observer = TestHelper.mockObserver();
  
          TestObserver<String> outer = new TestObserver<String>(observer);
  
          fromCallableObservable
                  .subscribeOn(Schedulers.computation())
                  .subscribe(outer);
  
          // Wait until func will be invoked
          observerLatch.await();
  
          // Unsubscribing before emission
          outer.cancel();
  
          // Emitting result
          funcLatch.countDown();
  
          // func must be invoked
          verify(func).call();
  
          // Observer must not be notified at all
          verify(observer).onSubscribe(any(Disposable.class));
          verifyNoMoreInteractions(observer);
      }
test_case.class_method_signature: ObservableFromCallableTest.shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission()
test_case.full_signature: @SuppressWarnings("unchecked") @Test public void shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission()
test_case.identifier: shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission
test_case.invocations: mock thenAnswer when call countDown await interrupt currentThread fromCallable mockObserver subscribe subscribeOn computation await cancel countDown call verify onSubscribe verify any verifyNoMoreInteractions
test_case.modifiers: @SuppressWarnings("unchecked") @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldNotDeliverResultIfSubscriberUnsubscribedBeforeEmission()
focal_class.declarator: callable
focal_class.modifier: final
focal_class.original_string: final Callable<? extends T> callable;
focal_class.type: Callable<? extends T>
focal_class.var_name: callable
focal_class.file: rxjava/src/main/java/io/reactivex/internal/operators/observable/ObservableFromCallable.java
focal_class.identifier: ObservableFromCallable
focal_class.interfaces: implements Callable<T>
focal_class.class_method_signature: ObservableFromCallable.ObservableFromCallable(Callable<? extends T> callable)
focal_class.full_signature: public  ObservableFromCallable(Callable<? extends T> callable)
focal_class.identifier: ObservableFromCallable
focal_class.modifiers: public
focal_class.parameters: (Callable<? extends T> callable)
focal_class.signature:  ObservableFromCallable(Callable<? extends T> callable)
focal_class.class_method_signature: ObservableFromCallable.subscribeActual(Observer<? super T> s)
focal_class.full_signature: @Override public void subscribeActual(Observer<? super T> s)
focal_class.identifier: subscribeActual
focal_class.modifiers: @Override public
focal_class.parameters: (Observer<? super T> s)
focal_class.return: void
focal_class.signature: void subscribeActual(Observer<? super T> s)
focal_class.class_method_signature: ObservableFromCallable.call()
focal_class.full_signature: @Override public T call()
focal_class.identifier: call
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: T
focal_class.signature: T call()
focal_class.superclass: extends Observable<T>
focal_method.body: @Override
      public T call() throws Exception {
          return ObjectHelper.requireNonNull(callable.call(), "The callable returned a null value");
      }
focal_method.class_method_signature: ObservableFromCallable.call()
focal_method.full_signature: @Override public T call()
focal_method.identifier: call
focal_method.invocations: requireNonNull call
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: T
focal_method.signature: T call()