title: How do you bypass static method calls?
body: <p>I have this line which is interferring in a unit test:</p>
  
  <pre><code>OtherClass.staticMethodThatWillErrorIfCalled().isAvailable();
  </code></pre>
  
  <p>If it wasn't static I could just mock OtherClass and then do this:</p>
  
  <pre><code>Mockito.doReturn(null).when(mockedOtherClass).staticMethodThatWillErrorIfCalled();
  Mockito.doReturn(true).when(mockedOtherClass).isGuiMode();
  </code></pre>
  
  <p>and the fact that it will error if called makes my attempts at using powermockito futile.</p>
  
  <p>I'm not sure how I can do this. All I want to do is skip over this line (it's an if check) and continue on as if it had returned true. What is the best way to do this?</p>