Failed to Mock Generated Test Cases
Symptom
Generated test cases fail to be mocked.
Figure 1 Mock failure
Possible Causes
The mockito-inline library is missing in the pom.xml file.
Troubleshooting Procedure
Add the mockito-inline library to the pom.xml file.
1 2 3 4 5 6 |
<dependency> <groupId>org.mockito</groupId> <artifactId>mockito-inline</artifactId> <version>3.9.0</version> <scope>test</scope> </dependency> |
The added mockito-inline library version must be compatible with the project.
Parent topic: FAQs