title: Persisting a mocked object with junit and easymock
body: <p>So I have used easymock for mocking my data layer objects while unit testing.
  I am using JPA for persistency. E.g. Project project = EasyMock.cre..(Project.class); etc.</p>
  
  <p>Now the method which I want to test gets this project does some stuff and then persists it calling persist(project). project is a mocked object so it throws me error here. My manager is telling me since you just want to test the functionality of the method. The return value from db is not imp that is why you should use mocking instead of real db. So in case of this method which has persist method call, what should I do?</p>
  
  <p>Thanks.</p>