I have a final class, something like this:
public final class RainOnTrees{ public void startRain(){ // some code here } }
I
Yes same problem here, we cannot mock a final class with Mockito. To be accurate, Mockito cannot mock/spy following:
But using a wrapper class seems to me a big price to pay, so get PowerMockito instead.