Added tests for transitive closure and reordered long lists of edges in tests