title: Testing a void method with Mockito
body: <p>I have a method like this:</p>
  
  <pre><code>public void someMethod() {
    A a = new A(); // Where A is some class.
    a.setVar1(20);
    a.someMethod();
  }
  </code></pre>
  
  <p>I want to test 2 things:</p>
  
  <ol>
  <li>The value of <code>Var1</code> member variable of a is 20. </li>
  <li><code>someMethod()</code> is called exactly once.</li>
  </ol>
  
  <p>I have 2 questions:</p>
  
  <ol>
  <li>Are those test objectives correct or should I be testing something else ?</li>
  <li>How exactly do I test this using Mockito ?</li>
  </ol>