Refactored againg linkd test class

All the test have been fixed