anchor.diff:          registerAccountBackend(
               AccountBackendMock(authenticatedUsers: [userA, userB]));
           await repo.removeUploader(pkg, 'b@x.com');
  -      });
  -    });
  -
  -    group('GCloudRepository.downloadUrl', () {
  -      test('successful', () async {
  -        final tarballStorage =
  -            TarballStorageMock(downloadUrlFun: expectAsync2((package, version) {
  -          return Uri.parse('http://blobstore/$package/$version.tar.gz');
  -        }));
  -        final repo = GCloudPackageRepository(null, tarballStorage);
  -
  -        final url = await repo.downloadUrl('foo', '0.1.0');
  -        expect('$url', 'http://blobstore/foo/0.1.0.tar.gz');
         });
       });
   
  
positive.code:     });
  
      group('Backend.lookupPackage', () {
        (<String, List<Package>>{
          'exists': [foobarPackage],
          'does not exist': [null],
        })
            .forEach((String testName, List<Package> expectedPackages) {
          test(testName, () async {
            List<Package> lookupFun(List<Key> keys) {
              expect(keys, hasLength(1));
              expect(keys.first.type, Package);
              expect(keys.first.id, 'foobar');
              return expectedPackages;
            }
  
            final db = DatastoreDBMock(lookupFun: expectAsync1(lookupFun));
            final backend = Backend(db, null);
  
            final package = await backend.lookupPackage('foobar');
            expect(package, equals(expectedPackages.first));
          });
        });
      });
  
      group('Backend.lookupPackageVersion', () {
        (<String, List<PackageVersion>>{
          'exists': [foobarStablePV],
          'does not exist': [null],
        })
            .forEach((String testName, List<PackageVersion> expectedVersions) {
          test(testName, () async {
            List<PackageVersion> lookupFun(List<Key> keys) {
              expect(keys, hasLength(1));
              expect(keys.first, foobarStablePV.key);
              return expectedVersions;
            }
  
            final db = DatastoreDBMock(lookupFun: expectAsync1(lookupFun));
            final backend = Backend(db, null);
  
            final version = await backend.lookupPackageVersion(
                foobarStablePV.package, foobarStablePV.version);
            expect(version, equals(expectedVersions.first));
          });
        });
      });
  
  
negative.code:     });
  
      group('Backend.versionsOfPackage', () {
        testWithServices('exists', () async {
          final list = await backend.versionsOfPackage('hydrogen');
          final values = list.map((pv) => pv.version).toList();
          values.sort();
          expect(values, hasLength(13));
          expect(values.first, '1.0.0');
          expect(values[5], '1.4.5');
          expect(values.last, '2.0.8');
        });
  
        testWithServices('package does not exists', () async {
          final list = await backend.versionsOfPackage('not_yet_a_package');
          expect(list, isEmpty);
        });
      });
  
      testWithServices('Backend.downloadUrl', () async {
        final url = await backend.downloadUrl('hydrogen', '2.0.8');
        expect(url.toString(),
            'http://localhost:0/fake-bucket-pub/packages/hydrogen-2.0.8.tar.gz');
      });
    });
  
  