Add test for hooks