mockito5.4.0单元测试(2) 在pom.xml里引入mockito-core jar包
pom.xml里引入mockito-core的jar包:
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.4.0</version>
<scope>test</scope>
</dependency>
然后在Java类里引入包内容:
import static org.mockito.Mockito.*;
![](https://images.cnblogs.com/cnblogs_com/zhuwenjoyce/945554/o_201113020411my-zhifubao-shouqianma.jpeg)