title: How to test void method with private method calls using Mockito
body: <p>I have the following piece of code</p>
  
  <pre><code>public class A extends B {
  private boolean workDone = false;
  @Override
  public void publicMethod(boolean flag) {
    if (!workDone) {
      privateMethod();
      workDone = true;
    }
    super.publicMethod(flag);
   }
   private void privateMethod() {
    // some logic here
   }
  }
  </code></pre>
  
  <p>I'm new to mocking. I have following doubts. I'm trying to test the public method.</p>
  
  <ol>
  <li>is it possible for me to assert the value of private variable workDone?</li>
  <li>is it possible to verify the method call in the super class?</li>
  <li>How can I mock the private method call in the method?</li>
  </ol>