add test for hasLink