Test covers remaining code in TopSort and TopSortNode.