Finished the refactoring of link tests

Ready for migrating test to enhanced linkd