how to do a unit testing on this method? anyone can help plzz?
public boolean saveOrUpdateUser(User user) {
boolean res = false;
try {
this.getHibernateTemplate().saveOrUpdate(user);
res = true;
} catch (DataAccessException e) {
res = false;
this.logger.error("DataAccessException", e);
}
return res;
}