I would lift the actual logic out of the Dao and t...
# test
t
I would lift the actual logic out of the Dao and test it in isolation. Ideally I’d just move that to the business layer, but if you want to keep it there you could just reorganise the code a bit. Your Dao could be made up of your logic and your driver, and all it does is shepherd the data between the 2. The logic can be unit tested by just creating objects. The driver can be tested against a DB as an integration test. If you keep the actual Dao simple enough, I wouldn’t test it at all and let higher level tests cover that