DefaultDao implements Dao<ENTITY, ENTITYLIST, KEY> { @Override public void save(final ENTITY entity) { LOG.info("Saving {}.entity: {}", getEntityClass().getSimpleName(), entity); persistenceManager.create(entity); }  @Override ENTITY getEntityById(final KEY id); @Override void save(final ENTITY entity); @Override void update(final ENTITY entity); @Override void delete(final ENTITY entity); @Override ENTITY getByUid(long uid); @Override ENTITY getByUidAndUap(long uid, String uapp); @Override ENTITY getByUidOrUtidAndUap(long uid, String utid, String uapp); @Override ENTITY getByUtid(String utid); @Override PagedResult<ENTITY> getEntities(final MultiplePagedSearch<ENTITYLIST> pagedSearch); ENTITY getSingleResult(Query<ENTITY> query); Class<ENTITY> getEntityClass(); PersistenceManager<ENTITY, KEY> getPersistenceManager(); QueryBuilder<ENTITYLIST> getQueryBuilder(); void setPersistenceManager(final PersistenceManager<ENTITY, KEY> persistenceManager); void setQueryBuilder(final QueryBuilder<ENTITYLIST> queryBuilder); void setEntityClass(final Class<ENTITY> entityClass);  }
@Test public void testSave() throws Exception { Long id = 1L; String abbrName = "abbr name"; String name = "name"; Department entity = new Department(); entity.setId(id); entity.setAbbrName(abbrName); entity.setName(name); unit.save(entity); verify(persistenceManager).create(entity); }