Added unit test for the case when new syntax is used with an old hook.