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
interfaceHelloSrv {
funsayHello(to:String): String
}
...
mock<HelloSrv> {
on { sayHello(check { }) } doReturn ""
on { sayHello(check { }) } doReturn ""// <-- fails here
}
java.lang.IllegalStateException: it must not be null
at kkk.command.AnyTest$should create non-null values$1$1$$special$$inlined$check$1.matches(Mockito.kt:57)
at org.mockito.internal.invocation.TypeSafeMatching.apply(TypeSafeMatching.java:24)
at org.mockito.internal.invocation.MatcherApplicationStrategy.forEachMatcherAndArgument(MatcherApplicationStrategy.java:82)
at org.mockito.internal.invocation.InvocationMatcher.argumentsMatch(InvocationMatcher.java:152)
at org.mockito.internal.invocation.InvocationMatcher.matches(InvocationMatcher.java:81)
at org.mockito.internal.stubbing.InvocationContainerImpl.findAnswerFor(InvocationContainerImpl.java:82)
at org.mockito.internal.handler.MockHandlerImpl.handle(MockHandlerImpl.java:88)
at org.mockito.internal.handler.NullResultGuardian.handle(NullResultGuardian.java:32)
at org.mockito.internal.handler.InvocationNotifierHandler.handle(InvocationNotifierHandler.java:36)
at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:41)
at org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$DispatcherDefaultingToRealMethod.interceptAbstract(MockMethodInterceptor.java:120)
at kkk.command.HelloSrv$MockitoMock$813194496.sayHello(Unknown Source)
at kkk.command.AnyTest$should create non-null values$1$2.invoke(AnyTest.kt:15)
at kkk.command.AnyTest$should create non-null values$1$2.invoke(AnyTest.kt:9)
at com.nhaarman.mockito_kotlin.KStubbing.on(Mockito.kt:119)
at kkk.command.AnyTest.should create non-null values(AnyTest.kt:15)
mockito-kotlin: 1.0.0
mockito: 2.2.28
The text was updated successfully, but these errors were encountered:
mockito-kotlin: 1.0.0
mockito: 2.2.28
The text was updated successfully, but these errors were encountered: