Add unit tests for HookHandler

Also get rid of test code related to the old parser.

Change-Id: I949821485031aeec7fa8ead73789af46bba697ef
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/666