### Question:
EntityManagerDaoAdapter implements Dao<Object>, Locator, Queryable, Flushable { public Object insert(final Object entity) { AssertArgument.isNotNull(entity, "entity"); entityManager.persist(entity); return null; } EntityManagerDaoAdapter(final EntityManager entityManager); void flush(); Object update(final Object entity); Object insert(final Object entity); Object delete(Object entity); @SuppressWarnings("unchecked") Collection<Object> lookup(final String name, final Object ... parameters); @SuppressWarnings("unchecked") Collection<Object> lookup(final String name, final Map<String, ?> parameters); @SuppressWarnings("unchecked") Collection<Object> lookupByQuery(final String query, final Object ... parameters); @SuppressWarnings("unchecked") Collection<Object> lookupByQuery(final String query, final Map<String, ?> parameters); EntityManager getEntityManager();  }### Answer:
@Test( groups = "unit" ) public void test_persist() { Object toPersist = new Object(); adapter.insert(toPersist); verify(entityManager).persist(same(toPersist)); }