Running unit tests locally on Android Studio works fine but when I run it with gradle using ./gradlew test
. The tests fails with the exception saying Mockito cannot spy/mock final classes. I thought using mockito with the inline extension was supposed to fix this. I have this dependency
in my gradle file testImplementation "org.mockito:mockito-inline:2.18.0"
Is there something that I'm missing?