Add tests for 'LinkEnd' hook functionality