title: Unit test for Runnable with Mockito
body: <p>I have a code like this for which I would like to write unit test.</p>
  
  <pre><code>public class TestClass {
  
  private final Executor executor;
  private final Handler handler;
  
  TestClass(Executor executor, Handler handler) {
      this.executor = executor;
      this.handler = handler;
  }
  
  void doSomething(String param1) {
      executor.execute(new Runnable() {
          @Override
          public void run() {
              //do something
              handler.callHandler();
          }
      });
  }
  }
  </code></pre>
  
  <p>How can I use Mockito / Powermockito to verify if the callHandler() method is invoked.</p>