Aug 18, 2023
if the query is too complicated you could also just return what you wish instead of implementing the same functionality, it would depend on how much of a "Unit" test you want it to be, if you want it to be an actual unit test it's better to mock instead of this approach.