I want to mock a static method in Mockito.
As far as I know this is not possible, how can I get around the problem? powermock is not an option.
I want that my authentication variable won't be null.
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
I read an answer here but I don't know how to put this answer to code. Can someone give a solution?