DefaultPersistenceManager implements PersistenceManager<T, I> { @Override public void remove(final T entity) { LOG.info("Removing entity for class:{}", entity.getClass()); enhance(DaoMethod.DELETE, entity); update(entity); }  @Override T create(final T entity); @Override T findById(final Class<T> clazz, final I id); @Override T update(final T entity); @Override void remove(final T entity); @Override PagedResult<T> search(final MultiplePagedQuerySearch<T> request); @Override T getSingleResult(final Query<T> query); @Override List<E> getMultipleResult(final Query<E> query); List<Object[]> executeNativeQuery(String sql); @Override Object[] executeSingleResultNativeQuery(String sql); void setPersistenceChains(final Map<DaoMethod, VerifierChainLink<? super Object>> persistenceChains); void setPersistenceEnhancers(final Map<DaoMethod, Enhancer<? super Object>> persistenceEnhancers);  }
@Test public void testRemove() throws Exception { Long id = 1L; String name = "name"; String abbrName = "abbrName"; String group = "developers"; Department entity = new Department(); entity.setId(id); entity.setAbbrName(abbrName); entity.setName(name); entity.setCrtUserGroup(group); unit.remove(entity); verify(updateVerifier).verify(entity); entity.setActual(0); entity.setStatus(RowStatus.DELETED); verify(entityManager).merge(entity); }