What you want to achieve is possible using tools like PowerMock.
At the same time, you should be aware that there is code which simply is "wrong" when you look at it from a testing perspective. If that's the case, then the correct approach is to change the code until it's easy test. Most of the time, you'll find that the code becomes "better" by this change: Less buggy, easier to understand & maintain, easier to use.