Anyone have experience with Mockito being an idiot...
# android
t
Anyone have experience with Mockito being an idiot?
n
Is it passing null to the method? It does that sometimes when using
eq
for mocking, for example. mockitokotlin solves that for me. Not sure if that will help with your issue
t
That’s the worst part, it isn’t. I can put a breakpoint before api.searchJobsCount and the parameter is not null. Even if it was, it’s Java - it can be nullable.
Google only keeps pointing to the method and class needing to be open - and it is.
x
Is the SearchRepository a class or an interface ?
a
Google this and there is an extension functions examples online that transform arguments of "eq" and "any" to nullable which will resolve your issue
👍 1