AbstractEntityDao extends JpaDaoSupport implements
        EntityDao<T> { public T merge(T entity) { Validate.notNull(entity, "Entity can't be null"); return getJpaTemplate().merge(entity); } AbstractEntityDao(Class<T> clazz); void persist(T entity); T merge(T entity); @Override T load(Integer id); @Override void delete(T entity);  }
@Test(expected = IllegalArgumentException.class) public void merge() { dao.merge(null); }