Add hook tests and documentation.