title: Mockito: mock async method
body: <p>I need to test this method with JUnit and Mockito</p>
  
  <pre><code> function uploadData() {
      myObject.getThreadPool().execute(new Runnable() {
                  @Override
                  public void run() {
                      upload(arguments, callbackContext);
                  }
              });
          }
  </code></pre>
  
  <p>How to mock myObject to call upload(arguments, callbackContext) not in background thread ?</p>