报错
org.mockito.exceptions.misusing.UnnecessaryStubbingException:
Unnecessary stubbings detected in test class: XXXTest
Clean & maintainable test code requires zero unnecessary code.
Following stubbings are unnecessary (click to navigate to relevant line of code):
1. -> at com.xxx.XXXTest.update_xxx(XXXTest.java:125)
Please remove unnecessary stubbings or use 'lenient' strictness. More info: javadoc for UnnecessaryStubbingException class.
解决
- 在跑test的时候,发现有多余的test代码行,删除 XXXTest.java 125行 的代码即可解决报错。