I'm trying to mock a method that returns a nullabl...
# mockk
j
I'm trying to mock a method that returns a nullable value type, and I see mockk going into an infinite loop. In JvmAutoHinter.autoHint(), every time it tries to invoke
block()
, it throws with the same exception,
java.lang.ClassCastException: class java.lang.Long cannot be cast to class org.jitsi.nlj.util.Bandwidth (java.lang.Long is in module java.base of loader 'bootstrap'; org.jitsi.nlj.util.Bandwidth is in unnamed module of loader 'app')
. (This is with the latest mockk, 1.13.8.). Is this a known issue? Any idea what I can look at either to fix it or to work around it?
(
Bandwidth
is a value class wrapping
Long
.)