Added tests for hooks and keys