Fix tests (exit error domain in hook loading unit tests)