So for my unit testing I am using easymock. I have a findProject method which queries the db and returns a list of the projects. I have mocked the object which returns the entityManger(I am using JPA and Hibernate). So it is something like : mockedRepository.findList() which returns the projectList. So now that is a mocked object. So in these situations I cannot check the return value of findList. Right? Cuz that is a mocked object and it just returns what I want. So if you want to test this kind of methods which query the db we cannot use mocking. Right? I can just check whether the methods have been called with easyMocking. Right?
Thanks.