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
java.lang.NullPointerException: Cannot invoke "cats.effect.IO.map(scala.Function1)" because "fa" is null
As is turned out, it means the mock can't find configured return answer for incoming request. The same as here:
whenF(mock.method("a")).thenReturn(response)
mock.method("b") // b is not configured input
I believe it is pretty much the same error as this:
You have a NullPointerException here:
-> at org.scalatest.OptionValues$Valuable.value(OptionValues.scala:126)
because this method call was *not* stubbed correctly:
-> at scala.Option.orElse(Option.scala:477)
foo.returnsGenericOption(ValueClass(HOLA));
But for some reason effect test libraries (i tried this with pure Cats Effect and Weaver) don't show the correct message.
Most definitely (if you didn't just messed up the inputs and outputs) you need to use eqTo + some equality implicit. Example for MockitoCats trait:
Recently i stuck with this error message:
As is turned out, it means the mock can't find configured return answer for incoming request. The same as here:
I believe it is pretty much the same error as this:
But for some reason effect test libraries (i tried this with pure Cats Effect and Weaver) don't show the correct message.
Most definitely (if you didn't just messed up the inputs and outputs) you need to use
eqTo
+ some equality implicit. Example forMockitoCats
trait:This is mostly for searching purposes of future users since i had troubles with debugging this thing. Guess it could be closed without any actions.
The text was updated successfully, but these errors were encountered: