testing Dao using mocks for query as well.