anchor.diff:  import 'dart:io';
   import 'package:unittest/unittest.dart';
   import 'package:bot_io/bot_io.dart';
  -import "package:discovery_api_client_generator/generator.dart";
  +import 'package:path/path.dart' as pathos;
  +import 'package:discovery_api_client_generator/generator.dart';
   
   const _testLibName = 'discovery';
   const _testLibVer = 'v1';
  
positive.code:           });
      });
  
      test('validate library', _testWithTempDir(_testSingleLibraryGeneration));
  
      test('validate generate via cli', _testWithTempDir(_testSingleLibraryGenerationViaCLI));
  
      test('"rest" args should throw', _testWithTempDir((tmpDir) {
        return _runGenerate(['--api', _testLibName, '-v', _testLibVer, '-o', tmpDir.path, 'silly_extra_arg'])
  
negative.code:       .then((ProcessResult pr) {
          expect(pr.exitCode, 0);
  
          return _validateDirectory(tmpDir.path, _testLibName, _testLibVer);
        });
  }
  
  Future _validateDirectory(String packageDir, String libName, String libVer) {
    var libraryPaths = _getLibraryPaths(packageDir, libName, libVer);
  
    expect(libraryPaths, hasLength(6));
  
    return _validateFilesExist(libraryPaths);
  }
  
  Future _validateFilesExist(List<String> files) {
    return Future.forEach(files, (filePath) {
      var file = new File(filePath);
      return file.exists()
          .then((bool exists) {
            expect(exists, isTrue, reason: '$filePath should exist');
          });
    });
  }
  
  List<String> _getLibraryPaths(String packageDir, String libName, String libVersion) {
    final name = '${libName}_${libVersion}_api';
    final libDir = 'dart_${name}_client/lib';
  
    var files = [];
  
    files.addAll(['', '_browser', '_console']
      .map((k) => 'src/cloud_api${k}.dart'));
  
    files.addAll(['console', 'browser', 'client']
      .map((k) => '${name}_${k}.dart'));
  
    return files
        .map((f) => pathos.join(packageDir, libDir, f))
        .toList(growable: false);
  }
  
  final Matcher _hasUsageInStdOut = predicate((ProcessResult pr) => pr.stdout.contains("""Usage:
  