Added the begin_modify and end_modify hooks to the unit tests