Add working test case for invalid hooks.