Had one issue with spring data, where I was trying...
# spring
t
Had one issue with spring data, where I was trying to mock repository.findByIdOrNull, which is an extension function, and I regretted not wrapping spring data repositories in my own interfaces. Is there a best practice for that other than wrapping?
s
For
findByIdOrNull
I guess you have to mock
findById
. For repositories, you can also directly extend
Repository
and specify only the methods you need.