Created
October 28, 2017 09:47
-
-
Save ColinHebert/5b25739db172580b8dd01d4ac015b4cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Documents/poc(mockitobug-2) $ ./gradlew clean test ⏎ | |
> Task :compileTestKotlin | |
Using Kotlin incremental compilation | |
> Task :junitPlatformTest FAILED | |
org.mockito.exceptions.base.MockitoException: | |
Mockito cannot mock this class: interface java.util.Iterator. | |
If you're not sure why you're getting this error, please report to the mailing list. | |
Java : 9 | |
JVM vendor name : Oracle Corporation | |
JVM vendor version : 9.0.1+11 | |
JVM name : Java HotSpot(TM) 64-Bit Server VM | |
JVM version : 9.0.1+11 | |
JVM info : mixed mode | |
OS name : Mac OS X | |
OS version : 10.12.6 | |
You are seeing this disclaimer because Mockito is configured to create inlined mocks. | |
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc. | |
Underlying exception : java.lang.IllegalArgumentException: Could not create type | |
at mockitobug.poc.BugSpekTest$1$1$1.invoke(BugSpekTest.kt:15) | |
at mockitobug.poc.BugSpekTest$1$1$1.invoke(BugSpekTest.kt:10) | |
at org.jetbrains.spek.engine.Scope$Test.execute(Scope.kt:102) | |
at org.jetbrains.spek.engine.Scope$Test.execute(Scope.kt:80) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:83) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:51) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:65) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:84) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:74) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:47) | |
at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:39) | |
Caused by: java.lang.IllegalArgumentException: Could not create type | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:140) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:346) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:161) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:355) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32) | |
at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:101) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:138) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:346) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:161) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:355) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32) | |
at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMockType(InlineByteBuddyMockMaker.java:200) | |
at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:181) | |
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35) | |
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:65) | |
at org.mockito.Mockito.mock(Mockito.java:1821) | |
at org.mockito.Mockito.mock(Mockito.java:1734) | |
... 62 more | |
Caused by: java.lang.NoClassDefFoundError: java/util/Iterator (wrong name: java/lang/WeakPairMap$Pair$Weak) | |
at java.base/java.lang.WeakPairMap$Pair.weak(WeakPairMap.java:201) | |
at java.base/java.lang.WeakPairMap.putIfAbsent(WeakPairMap.java:123) | |
at java.base/java.lang.Module.implAddReads(Module.java:396) | |
at java.base/java.lang.Module.implAddReads(Module.java:357) | |
at java.base/java.lang.System$2.addReads(System.java:2146) | |
at java.base/jdk.internal.module.Modules.addReads(Modules.java:85) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.lambda$getDynamicModule$4(Proxy.java:884) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:327) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:203) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.getDynamicModule(Proxy.java:875) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.mapToModule(Proxy.java:814) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:631) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:636) | |
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$0(Proxy.java:415) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:327) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:203) | |
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:413) | |
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:999) | |
at java.base/sun.reflect.annotation.AnnotationParser$1.run(AnnotationParser.java:305) | |
at java.base/sun.reflect.annotation.AnnotationParser$1.run(AnnotationParser.java:303) | |
at java.base/java.security.AccessController.doPrivileged(Native Method) | |
at java.base/sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:303) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:293) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) | |
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:605) | |
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:603) | |
at java.base/java.lang.reflect.Executable.getDeclaredAnnotations(Executable.java:591) | |
at java.base/java.lang.reflect.Constructor.getDeclaredAnnotations(Constructor.java:579) | |
at net.bytebuddy.description.method.MethodDescription$ForLoadedConstructor.getDeclaredAnnotations(MethodDescription.java:912) | |
at net.bytebuddy.description.method.MethodDescription$TypeSubstituting.getDeclaredAnnotations(MethodDescription.java:1353) | |
at net.bytebuddy.description.method.MethodDescription$AbstractBase.asToken(MethodDescription.java:695) | |
at net.bytebuddy.description.method.MethodDescription$AbstractBase.asToken(MethodDescription.java:334) | |
at net.bytebuddy.description.method.MethodList$AbstractBase.asTokenList(MethodList.java:53) | |
at net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy$Default$5.doExtractConstructors(ConstructorStrategy.java:157) | |
at net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy$Default.extractConstructors(ConstructorStrategy.java:176) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.applyConstructorStrategy(SubclassDynamicTypeBuilder.java:185) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.make(SubclassDynamicTypeBuilder.java:162) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.make(SubclassDynamicTypeBuilder.java:155) | |
at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase.make(DynamicType.java:2639) | |
at org.mockito.internal.creation.bytebuddy.SubclassBytecodeGenerator.mockClass(SubclassBytecodeGenerator.java:114) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:138) | |
... 80 more | |
java.lang.Error | |
at mockitobug.poc.BugSpekTest$1$1$1.invoke(BugSpekTest.kt:18) | |
at mockitobug.poc.BugSpekTest$1$1$1.invoke(BugSpekTest.kt:10) | |
at org.jetbrains.spek.engine.Scope$Test.execute(Scope.kt:102) | |
at org.jetbrains.spek.engine.Scope$Test.execute(Scope.kt:80) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:83) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Unknown Source) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:51) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:65) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:84) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:74) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:47) | |
at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:39) | |
org.mockito.exceptions.base.MockitoException: | |
Mockito cannot mock this class: interface java.util.Iterator. | |
If you're not sure why you're getting this error, please report to the mailing list. | |
Java : 9 | |
JVM vendor name : Oracle Corporation | |
JVM vendor version : 9.0.1+11 | |
JVM name : Java HotSpot(TM) 64-Bit Server VM | |
JVM version : 9.0.1+11 | |
JVM info : mixed mode | |
OS name : Mac OS X | |
OS version : 10.12.6 | |
You are seeing this disclaimer because Mockito is configured to create inlined mocks. | |
You can learn about inline mocks and their limitations under item #39 of the Mockito class javadoc. | |
Underlying exception : java.lang.IllegalArgumentException: Could not create type | |
at mockitobug.poc.BugJupitetTest.test(BugJupiterTest.kt:12) | |
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.base/java.lang.reflect.Method.invoke(Method.java:564) | |
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:389) | |
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115) | |
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:167) | |
at org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40) | |
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:163) | |
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:110) | |
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:57) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:83) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$null$2(HierarchicalTestExecutor.java:92) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) | |
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177) | |
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) | |
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) | |
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) | |
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) | |
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) | |
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) | |
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) | |
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:430) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.lambda$execute$3(HierarchicalTestExecutor.java:92) | |
at org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:77) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:51) | |
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154) | |
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.executeTests(ConsoleTestExecutor.java:65) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.lambda$execute$0(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.tasks.CustomContextClassLoaderExecutor.invoke(CustomContextClassLoaderExecutor.java:33) | |
at org.junit.platform.console.tasks.ConsoleTestExecutor.execute(ConsoleTestExecutor.java:57) | |
at org.junit.platform.console.ConsoleLauncher.executeTests(ConsoleLauncher.java:84) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:74) | |
at org.junit.platform.console.ConsoleLauncher.execute(ConsoleLauncher.java:47) | |
at org.junit.platform.console.ConsoleLauncher.main(ConsoleLauncher.java:39) | |
Caused by: java.lang.IllegalArgumentException: Could not create type | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:140) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:346) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:161) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:355) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32) | |
at org.mockito.internal.creation.bytebuddy.InlineBytecodeGenerator.mockClass(InlineBytecodeGenerator.java:101) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:138) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:346) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:161) | |
at net.bytebuddy.TypeCache$WithInlineExpunction.findOrInsert(TypeCache.java:355) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator.mockClass(TypeCachingBytecodeGenerator.java:32) | |
at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMockType(InlineByteBuddyMockMaker.java:200) | |
at org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:181) | |
at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35) | |
at org.mockito.internal.MockitoCore.mock(MockitoCore.java:65) | |
at org.mockito.Mockito.mock(Mockito.java:1821) | |
at org.mockito.Mockito.mock(Mockito.java:1734) | |
... 56 more | |
Caused by: java.lang.NoClassDefFoundError: java/util/Iterator (wrong name: java/lang/WeakPairMap$Pair$Weak) | |
at java.base/java.lang.WeakPairMap$Pair.weak(WeakPairMap.java:201) | |
at java.base/java.lang.WeakPairMap.putIfAbsent(WeakPairMap.java:123) | |
at java.base/java.lang.Module.implAddReads(Module.java:396) | |
at java.base/java.lang.Module.implAddReads(Module.java:357) | |
at java.base/java.lang.System$2.addReads(System.java:2146) | |
at java.base/jdk.internal.module.Modules.addReads(Modules.java:85) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.lambda$getDynamicModule$4(Proxy.java:884) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:327) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:203) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.getDynamicModule(Proxy.java:875) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.mapToModule(Proxy.java:814) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:631) | |
at java.base/java.lang.reflect.Proxy$ProxyBuilder.<init>(Proxy.java:636) | |
at java.base/java.lang.reflect.Proxy.lambda$getProxyConstructor$0(Proxy.java:415) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue$Memoizer.get(AbstractClassLoaderValue.java:327) | |
at java.base/jdk.internal.loader.AbstractClassLoaderValue.computeIfAbsent(AbstractClassLoaderValue.java:203) | |
at java.base/java.lang.reflect.Proxy.getProxyConstructor(Proxy.java:413) | |
at java.base/java.lang.reflect.Proxy.newProxyInstance(Proxy.java:999) | |
at java.base/sun.reflect.annotation.AnnotationParser$1.run(AnnotationParser.java:305) | |
at java.base/sun.reflect.annotation.AnnotationParser$1.run(AnnotationParser.java:303) | |
at java.base/java.security.AccessController.doPrivileged(Native Method) | |
at java.base/sun.reflect.annotation.AnnotationParser.annotationForMap(AnnotationParser.java:303) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:293) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) | |
at java.base/sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) | |
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:605) | |
at java.base/java.lang.reflect.Executable.declaredAnnotations(Executable.java:603) | |
at java.base/java.lang.reflect.Executable.getDeclaredAnnotations(Executable.java:591) | |
at java.base/java.lang.reflect.Constructor.getDeclaredAnnotations(Constructor.java:579) | |
at net.bytebuddy.description.method.MethodDescription$ForLoadedConstructor.getDeclaredAnnotations(MethodDescription.java:912) | |
at net.bytebuddy.description.method.MethodDescription$TypeSubstituting.getDeclaredAnnotations(MethodDescription.java:1353) | |
at net.bytebuddy.description.method.MethodDescription$AbstractBase.asToken(MethodDescription.java:695) | |
at net.bytebuddy.description.method.MethodDescription$AbstractBase.asToken(MethodDescription.java:334) | |
at net.bytebuddy.description.method.MethodList$AbstractBase.asTokenList(MethodList.java:53) | |
at net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy$Default$5.doExtractConstructors(ConstructorStrategy.java:157) | |
at net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy$Default.extractConstructors(ConstructorStrategy.java:176) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.applyConstructorStrategy(SubclassDynamicTypeBuilder.java:185) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.make(SubclassDynamicTypeBuilder.java:162) | |
at net.bytebuddy.dynamic.scaffold.subclass.SubclassDynamicTypeBuilder.make(SubclassDynamicTypeBuilder.java:155) | |
at net.bytebuddy.dynamic.DynamicType$Builder$AbstractBase.make(DynamicType.java:2639) | |
at org.mockito.internal.creation.bytebuddy.SubclassBytecodeGenerator.mockClass(SubclassBytecodeGenerator.java:114) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:37) | |
at org.mockito.internal.creation.bytebuddy.TypeCachingBytecodeGenerator$1.call(TypeCachingBytecodeGenerator.java:34) | |
at net.bytebuddy.TypeCache.findOrInsert(TypeCache.java:138) | |
... 74 more | |
Failures (1): | |
Spek:mockitobug.poc.BugSpekTest:describe test:it works | |
=> java.lang.Error | |
Test run finished after 1049 ms | |
[ 6 containers found ] | |
[ 0 containers skipped ] | |
[ 6 containers started ] | |
[ 0 containers aborted ] | |
[ 6 containers successful ] | |
[ 0 containers failed ] | |
[ 2 tests found ] | |
[ 0 tests skipped ] | |
[ 2 tests started ] | |
[ 0 tests aborted ] | |
[ 1 tests successful ] | |
[ 1 tests failed ] | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
Execution failed for task ':junitPlatformTest'. | |
> Process 'command '/Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1 | |
* Try: | |
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. | |
* Get more help at https://help.gradle.org | |
BUILD FAILED in 3s | |
3 actionable tasks: 3 executed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment