您可以通过添加 @ExtendWith(MockitoExtension.class) 到测试类并使用注释模拟字段来应用扩展 @Mock 。从 MockitoExtension 的JavaDoc:
確定! 回上一頁