You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't to combine use of mockito and badua in testing of Apache projects. In particular the error is: "Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)" when the test try to build the mock of any class. I have include any necessary library , indeed test work fine without badua and also with JaCoCo or other tool of coverage.
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.bookkeeper.bookie.storage.ldb.WriteCachePutTest
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 1.177 s <<< FAILURE! - in org.apache.bookkeeper.bookie.storage.ldb.WriteCachePutTest
[ERROR] initializationError(org.apache.bookkeeper.bookie.storage.ldb.WriteCachePutTest) Time elapsed: 0.014 s <<< ERROR!
java.lang.IllegalStateException: Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)
at org.mockito.internal.configuration.plugins.PluginLoader$1.invoke(PluginLoader.java:88)
at jdk.proxy2/jdk.proxy2.$Proxy12.isTypeMockable(Unknown Source)
at org.mockito.internal.util.MockUtil.typeMockabilityOf(MockUtil.java:33)
at org.mockito.internal.util.MockCreationValidator.validateType(MockCreationValidator.java:22)
at org.mockito.internal.creation.MockSettingsImpl.validatedSettings(MockSettingsImpl.java:250)
at org.mockito.internal.creation.MockSettingsImpl.build(MockSettingsImpl.java:232)
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:83)
at org.mockito.Mockito.mock(Mockito.java:1964)
at org.mockito.Mockito.mock(Mockito.java:1879)
at org.apache.bookkeeper.bookie.storage.ldb.WriteCachePutTest.getByteBuff(WriteCachePutTest.java:115)
at org.apache.bookkeeper.bookie.storage.ldb.WriteCachePutTest.getParameters(WriteCachePutTest.java:66)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.runners.Parameterized.allParameters(Parameterized.java:280)
at org.junit.runners.Parameterized.<init>(Parameterized.java:248)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:362)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.IllegalStateException: Failed to load interface org.mockito.plugins.MockMaker implementation declared in java.lang.CompoundEnumeration@4748a0f9
at org.mockito.internal.configuration.plugins.PluginInitializer.loadImpl(PluginInitializer.java:58)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:69)
at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:54)
at org.mockito.internal.configuration.plugins.PluginRegistry.<init>(PluginRegistry.java:29)
at org.mockito.internal.configuration.plugins.Plugins.<clinit>(Plugins.java:20)
at org.mockito.internal.util.MockUtil.<clinit>(MockUtil.java:28)
... 32 more`
it's possibile or known some incompatibility beetween two tool?
The text was updated successfully, but these errors were encountered:
I can't to combine use of mockito and badua in testing of Apache projects. In particular the error is: "Could not initialize plugin: interface org.mockito.plugins.MockMaker (alternate: null)" when the test try to build the mock of any class. I have include any necessary library , indeed test work fine without badua and also with JaCoCo or other tool of coverage.
it's possibile or known some incompatibility beetween two tool?
The text was updated successfully, but these errors were encountered: