How to write Junit for jdbcTemplate call method
Seriously I do not recommend to test with Mock for this case since you are testing the DAO which is the data access layer , and the best way to test the data access layer is test with the actual DB but not the mock. Because in the end you still need to have some kind of integration test to verify your application can really get and update data from/to DB correctly and this DAO is the most appropriate place to do it.
You can check with Testcontainers which allows you to test with a containerised version of the DB which in theory should be very close to your actual production DB. You can refer to this for an example.