@Test public void persist() throws DaoStoreException { Employment employment = EmploymentDaoJpaTest.createEmployment(1, "test user"); when(dao.persist(employment)).thenReturn(employment); Employment actual = service.persist(employment); verify(dao).persist(employment); assertSame(employment, actual); }