I\'m trying to test a class in a Spring project. I would like to make as many changes as possible in the test class vs. the dao class so that I don\'t have to retest all sor
If you're testing a DAO it makes no sense at all to mock the data source. What are you testing? You need to make a DAO that interacts with the database.
Once you have that working, you're free to mock the interface-based DAO when testing services that use it. You've already tested the DAO; there's no reason to redo it when testing the services.
I'd say you're off-track if you're mocking the data source when testing the DAO.