title: How to mock/test method that returns void, possibly in Mockito
body: <p>I came across a problem and I can't find an elegant solution.</p>
  
  <p>So the problem is with a mock of Selenium web driver, and I dont know how should I test/mock void methods.</p>
  
  <pre><code>public void clickAndWait(String locator) {
      if(isElementPresent(locator) == false) throw some exception;
      selenium.clickAndWait(); //a problematic delegating call to selenium
  }
  </code></pre>
  
  <p>So what I am asking is, how to properly test such a method, one test would be for exception being thrown, but how properly make test of that void method I delegate to?</p>