Includes a test and some improvements to the CiteHooks tests. Change-Id: I0e9108d0d429ed9b7467f993441eefc2557c8e6f