title: Mock a static method with mockito
body: <p>I want to mock a static method in Mockito.</p>
  
  <p>As far as I know this is <a href="https://stackoverflow.com/questions/4482315/why-does-mockito-not-mock-static-methods">not possible</a>, how can I get around the problem?
  powermock is not an option. </p>
  
  <p>I want that my authentication variable won't be null.</p>
  
  <pre><code>Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
  </code></pre>
  
  <p>I read an answer <a href="https://stackoverflow.com/questions/12139841/how-to-mock-static-methods-with-mockito">here</a> but I don't know how to put this answer to code.
  Can someone give a solution? </p>