My classes are following this structure
Service Tier (creates and maps InputDTO to DB Data) ->
DAO Tier (actually executes DB calls)
When I write the service tier JUnits, and when it calls DAO Tier, it expects an actual DB connection and getting data from the DB.
Should I be mocking the DAO tier completely from the service tier, or should I be mocking the DB connection and data received from the DB?
Secondly, the app expects certain data from a Cache.
For JUnit run time, there is no Cache, so how should this be handled - since the service tier method includes looking up the cache to get the details.