Add test cases for hook and unhook commands