Junit 测试正常运行但因 ecobertura 失败 - 需要但未调用 appender.doAppend(<Capturing argument>);

use*_*539 5 java eclipse junit4 powermock ecobertura

以下代码:

@Mock
private Appender mockAppender;
@Captor
private ArgumentCaptor<LoggingEvent> captorLoggingEvent;
...
verify(mockAppender, atLeastOnce()).doAppend(captorLoggingEvent.capture());
Run Code Online (Sandbox Code Playgroud)

作为 JUnit 测试正常运行,但使用 ecobertura 失败并显示以下消息:

Wanted but not invoked:
appender.doAppend(<Capturing argument>);...Actually, there were zero interactions with this mock.
Run Code Online (Sandbox Code Playgroud)

我正在使用 :

  • 日食 STS
  • JRE(jdk1.6.0_41)
  • junit-4.11.jar
  • powermock-module-junit4-common-1.5.1.jar
  • powermock-module-junit4-1.5.1.jar
  • powermock-reflect-1.5.1.jar
  • mockito-core-1.9.5.jar

你能帮我解决这个问题吗?