Test the hook adding and removal