---
title: “Mockito's inline mock maker is not supported”运行报错的解决方法
description: "运行测试用例失败，报错信息如图1所示。图1 Mock失败"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevps/development/utgen/UTgen_0012.html
sourcePath: /source/zh/kunpengdevps/development/utgen/UTgen_0012.html
indexId: 80e66529f8b2cd8f8a9973bb01b942c6e2bf11c182c332a49b895585af4b423957
---
# “Mockito's inline mock maker is not supported”运行报错的解决方法

#### 现象描述

运行测试用例失败，报错信息如图1所示。图1 Mock失败


#### 可能原因

pom.xml文件未添加mockito-inline库。


#### 处理步骤

在pom.xml文件中添加mockito-inline库。```
<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-inline</artifactId>
    <version>3.9.0</version>
    <scope>test</scope>
</dependency>
```

添加的mockito-inline库版本需要与项目兼容。
