Java 单元测试PowerMockito

单元测试报错系列

Cannot instantiate @InjectMocks field named 'contractService'! Cause: the type 'ContractService' is an interface.
You haven't provided the instance at field declaration so I tried to construct the instance.

解决方案:将接口改成实现类

原文地址:https://www.cnblogs.com/mengjianzhou/p/14474290.html