         roots: [TestPackage],
         packages: [TestPackage]
     ) throws {
+        precondition(Set(roots.map({$0.name})).count == roots.count, "Root packages should be unique")
         self.sandbox = sandbox
         self.fs = fs
         self.roots = roots


private struct TestDependency {
    let name: String
    let requirement: String

    fileprivate init(name: String, requirement: String) {
        self.name = name
        self.requirement = requirement
    }
}


                        TestProduct(name: "Foo", targets: ["Foo", "Bar"]),
                    ],
                    dependencies: [
                        TestDependency(name: "Baz", requirement: .upToNextMajor(from: "1.0.0")),
                    ]
                ),
            ],
