title: PowerMock access private static members
body: <p>How I can access the following private static field foo by PowerMock. I just want to verify that Foo for example is not null and I can't refactor the code by adding getters.</p>
  
  <pre><code>public class Bar{
  
     private static Foo foo = new Foo();
  
  
  }
  </code></pre>
  
  <p>I try to use this but it does not work: </p>
  
  <pre><code>Foo foo = Whitebox.getInternalState(bar, "foo");
  </code></pre>