Add unit testing for the hooks module