Refactored tests for links