### Question:
CrudDAO { public void delete(T entity) { this.wrapper.wrapAndExecute(session -> { session.delete(entity); return null; }); } CrudDAO(SessionFactory sf); int add(T entity); void delete(T entity); void update(T entity); @SuppressWarnings("unchecked") T findById(int id); @SuppressWarnings("unchecked") List<T> findAll();  }### Answer:
@Test public void delete() { int entityId = this.getTestDao().add(this.getTestEntity()); T entity = this.getTestEntity(); entity.setId(entityId); this.getTestDao().delete(entity); assertNull(this.getTestDao().findById(entityId)); }