title: Mockito: How to get the arguments passed to a method when the return type of the method is void
body: <p>I've read <a href="https://stackoverflow.com/questions/2684630/mockito-how-to-make-a-method-return-an-argument-that-was-passed-to-it">this post</a>, but my problem is that my <code>myFunction</code> returns <code>void</code> instead of an Object. So I get errors at </p>
  
  <p><code>when(mock.myFunction(anyString()))</code> </p>
  
  <p>saying </p>
  
  <pre><code>when (java.lang.Void) in Mockito cannot be applied 
  to   (void)
  </code></pre>
  
  <p>How can I deal with this issue?</p>