gpt4 book ai didi

hadoop - Hadoop Mapreduce-Eclipse junit错误原因:java.lang.ClassNotFoundException:org.mockito.stubbing.Answer

转载 作者:行者123 更新时间:2023-12-02 20:50:07 25 4
gpt4 key购买 nike

我正在尝试在Eclipse中为MRUnit设置hadoop mapper测试用例。

试图从eclipse运行Junit时给出原因:

 java.lang.ClassNotFoundException: org.mockito.stubbing.Answer

最佳答案

似乎您缺少Mockito的依赖项。如果您使用Maven,请包括

<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>

或直接下载JAR并将其包含在您的项目中
http://central.maven.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar

关于hadoop - Hadoop Mapreduce-Eclipse junit错误原因:java.lang.ClassNotFoundException:org.mockito.stubbing.Answer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46230044/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com