Refactors and adds new curl hook tests.