Fixed tests for hookEvents()