Add test for get_hook_by_name