build_adjacency_list method tested.