I have a final class, something like this:
public final class RainOnTrees{ public void startRain(){ // some code here } }
I
Mocking final classes is not supported for mockito-android as per this GitHub issue. You should use Mockk instead for this.
For both unit test and ui test, you can use Mockk with no problem.