title: Capture arguments of a static method call in Mockito
body: <p>I am trying to unit test a method call in android studio using Mockito. It is something like this:</p>
  <pre><code>public static class DeviceMessageHandler extends Handler {
      public DeviceMessageHandler(Looper looper) {
          super(looper);
  }
  
  @Override
      public void handleMessage(Message msg) {
  
          try {
              switch (msg.what) {
                  default:
                      String message = (String) msg.obj;
  
                      DeviceRequest deviceRequest = new Gson().fromJson(message, DeviceRequest.class);
                      String requestType = deviceRequest.getKey();
                      if (DeviceMessage.SOME_ACTION.equals(requestType)) {
                          sendResponseWithMessage(execId, COMMAND_STATE, &quot;Not accepted&quot;);
                      }
                  }
              }
          }
  }
  
  public static void sendResponseWithMessage(String execId, String commandState, String reasonIfAny) {
  //  do some work
  } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  <p>So here I am able to call sendResponsewithMessage. I want to check the parameters being passed when I am calling this method. The problem being that it is a static method and I do not know how to capture parameters passed to a static method. I tried using PowerMock but since this is an android project, I am not able to use PowerMock. Any way I can assert the parameters passed on the method call with expected values?</p>