So the question is, how do I get `mock.fn()` to re...
# mockk
j
So the question is, how do I get
mock.fn()
to return 3
m
maybe i’m just missing a detail here, but i think you can just do
every { mock.fn() } returns 3
j
Right but I want to test
fn()
and not mock it
m
oh i see, then you should use `every { mock.fn() } answers { callOriginal() }
j
Oh I haven’t seen that one before, let me try it!
Unfortunately that still gives me
java.lang.NullPointerException
Because a and b are not defined within
fn()
Ahhh because I had
spyk
!
It actually works with
mockk
👍 1