title: PowerMock access private members
body: <p>After reading:
  <a href="https://code.google.com/p/powermock/wiki/BypassEncapsulation" rel="noreferrer">https://code.google.com/p/powermock/wiki/BypassEncapsulation</a>
  i realized, i don't get it.</p>
  
  <p>See in this example:</p>
  
  <pre><code>public class Bar{
     private Foo foo;
  
     public void initFoo(){
         foo = new Foo();
     }
  }
  </code></pre>
  
  <p>How can i access the private member <code>foo</code> by using PowerMock (For example to verify that <code>foo</code>is not null)?   </p>
  
  <p><strong>Note:</strong><br>
  What i don't want is modifying the code with extra <code>get</code>methods.</p>
  
  <p><strong>Edit:</strong><br>
  I realized that i missed a sample code block on the linked page with the solution.</p>
  
  <p><strong>Solution:</strong>   </p>
  
  <pre><code> Whitebox.getInternalState(bar, "foo");
  </code></pre>