Add unit test for function initLinkList.