Open khahani opened 1 year ago
thank you, it works for me: I implementing the last version of Mokito:
testImplementation 'org.mockito:mockito-core:5.6.0'
Thank you for posting this. Just an update: I upgraded mockito to testImplementation 'org.mockito:mockito-core:5.12.0' and it worked.
To fix the below error which occurs when running unit tests that have a dependency with the
UserManager
class, we need to update Mockito to a version higher than 5.0.0 because mocking final classes feature is enabled by default. In my case updating Mockito to version 5.3.1 fixed the issue.Solution:
testImplementation 'org.mockito:mockito-core:5.3.1'
Problem: