anchor.diff:    BazelWorkspacePackage package;
   
     void test_contains_differentPackage_summarySource() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  -    var source = InSummarySource(
  -        Uri.parse('package:some.other.code/file.dart'), '' /* summaryPath */);
  +    _setUpPackage();
  +    var source = _inSummarySource('package:some.other.code/file.dart');
       expect(package.contains(source), isFalse);
     }
   
     void test_contains_differentPackageInWorkspace() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  +    _setUpPackage();
   
       // A file that is _not_ in this package is not required to have a BUILD
       // file above it, for simplicity and reduced I/O.
       expect(
  -        package
  -            .contains(TestSource(convertPath('/ws/some/other/code/file.dart'))),
  -        isFalse);
  +      package.contains(
  +        _testSource('/ws/some/other/code/file.dart'),
  +      ),
  +      isFalse,
  +    );
     }
   
     void test_contains_differentWorkspace() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  -    expect(package.contains(TestSource(convertPath('/ws2/some/file.dart'))),
  -        isFalse);
  +    _setUpPackage();
  +    expect(
  +      package.contains(
  +        _testSource('/ws2/some/file.dart'),
  +      ),
  +      isFalse,
  +    );
     }
   
     void test_contains_samePackage() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  +    _setUpPackage();
       final targetFile = newFile('/ws/some/code/lib/code2.dart');
       final targetFile2 = newFile('/ws/some/code/lib/src/code3.dart');
       final targetBinFile = newFile('/ws/some/code/bin/code.dart');
       final targetTestFile = newFile('/ws/some/code/test/code_test.dart');
   
  -    expect(package.contains(TestSource(targetFile.path)), isTrue);
  -    expect(package.contains(TestSource(targetFile2.path)), isTrue);
  -    expect(package.contains(TestSource(targetBinFile.path)), isTrue);
  -    expect(package.contains(TestSource(targetTestFile.path)), isTrue);
  +    expect(package.contains(_testSource(targetFile.path)), isTrue);
  +    expect(package.contains(_testSource(targetFile2.path)), isTrue);
  +    expect(package.contains(_testSource(targetBinFile.path)), isTrue);
  +    expect(package.contains(_testSource(targetTestFile.path)), isTrue);
     }
   
     void test_contains_samePackage_summarySource() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  +    _setUpPackage();
       newFile('/ws/some/code/lib/code2.dart');
       newFile('/ws/some/code/lib/src/code3.dart');
  -    final file2Source = InSummarySource(
  -        Uri.parse('package:some.code/code2.dart'), '' /* summaryPath */);
  -    final file3Source = InSummarySource(
  -        Uri.parse('package:some.code/src/code2.dart'), '' /* summaryPath */);
  +    final file2Source = _inSummarySource('package:some.code/code2.dart');
  +    final file3Source = _inSummarySource('package:some.code/src/code2.dart');
   
       expect(package.contains(file2Source), isTrue);
       expect(package.contains(file3Source), isTrue);
     }
   
     void test_contains_subPackage() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  +    _setUpPackage();
       newFile('/ws/some/code/testing/BUILD');
       newFile('/ws/some/code/testing/lib/testing.dart');
   
       expect(
  -        package.contains(
  -            TestSource(convertPath('/ws/some/code/testing/lib/testing.dart'))),
  -        isFalse);
  +      package.contains(
  +        _testSource('/ws/some/code/testing/lib/testing.dart'),
  +      ),
  +      isFalse,
  +    );
     }
   
     void test_findPackageFor_buildFileExists() {
  -    _setUpPackage('/ws/some/code', workspaceRoot: '/ws');
  +    _setUpPackage();
   
       expect(package, isNotNull);
       expect(package.root, convertPath('/ws/some/code'));
  
positive.code:       '/ws/blaze-out/k8-opt/bin/some/code/',
        '/ws/some/code/lib/code.dart',
      ]);
      workspace =
          BazelWorkspace.find(resourceProvider, convertPath('/ws/some/code'));
  
      package = workspace.findPackageFor('/ws/some/code/lib/code.dart');
      expect(package, isNotNull);
      expect(package.root, convertPath('/ws/some/code'));
      expect(package.workspace, equals(workspace));
  
negative.code:       '/ws/blaze-out/host/bin/some/code/code.packages',
        '/ws/some/code/lib/code.dart',
      ]);
      workspace = BazelWorkspace.find(
        resourceProvider,
        convertPath('/ws/some/code'),
      );
  
      package = workspace.findPackageFor(
        convertPath('/ws/some/code/lib/code.dart'),
      );
      expect(package, isNotNull);
      expect(package.root, convertPath('/ws/some/code'));
      expect(package.workspace, equals(workspace));
  