### Question:
AbstractCrudService extends AbstractDaoService<E, D> { @PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#e, 'DELETE')") public void delete(E e) { dao.delete(e); } protected  AbstractCrudService(Class<E> entityClass); @PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName())" + " or (#e.id == null and hasPermission(#e, 'CREATE'))" + " or (#e.id != null and hasPermission(#e, 'UPDATE'))") void saveOrUpdate(E e); @PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#entity, 'UPDATE')") E updatePartialWithJsonNode(E entity, JsonNode jsonObject, ObjectMapper objectMapper); @PostAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(returnObject, 'READ')") @Transactional(readOnly = true) E findById(Integer id); @PostAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(returnObject, 'READ')") @Transactional(readOnly = true) E loadById(int id); @PostFilter("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, 'READ')") @Transactional(readOnly = true) List<E> findAll(); @PostFilter("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, 'READ')") List<E> findAllRestricted(MultiValueMap<String, String> restrictToRequest); @PostFilter("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, 'READ')") @Transactional(readOnly = true) List<E> findBySimpleFilter(MultiValueMap<String, String> requestedFilter); @PostFilter("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, 'READ')") @Transactional(readOnly = true) List<E> findAllWhereFieldEquals(String fieldName, Object fieldValue); @PostFilter("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(filterObject, 'READ')") @Transactional(readOnly = true) List<E> findAllWithCollectionContaining(String fieldName, PersistentObject subElement); @PreAuthorize("hasRole(@configHolder.getSuperAdminRoleName()) or hasPermission(#e, 'DELETE')") void delete(E e);  }### Answer:
@Test public void delete_shouldDelete() throws NoSuchFieldException, IllegalAccessException { Set<E> persistedObjects = new HashSet<E>(); persistedObjects.add(implToTest); doNothing().when(dao).delete(implToTest); crudService.delete(implToTest); verify(dao, times(1)).delete(implToTest); }