tests for parseLink

@luolong as you suggested here is with test refactor.