anchor.diff:  // Copyright 2018 The Chromium Authors. All rights reserved.
   // Use of this source code is governed by a BSD-style license that can be
   // found in the LICENSE file.
  +import 'dart:convert';
   
  +import 'package:archive/archive.dart';
  +import 'package:file/file.dart';
  +import 'package:file/memory.dart';
   import 'package:flutter_tools/src/base/file_system.dart';
   import 'package:flutter_tools/src/doctor.dart';
   import 'package:flutter_tools/src/intellij/intellij.dart';
  
positive.code:             (ValidationMessage m) => m.message.startsWith('Flutter '));
          expect(message.message, contains('Flutter plugin version 0.1.3'));
          expect(message.message, contains('recommended minimum version'));
        });
  
        testUsingContext('not found', () async {
          final String pluginsPath =
              fs.path.join('test', 'data', 'intellij', 'no_plugins');
          final IntelliJPlugins plugins = new IntelliJPlugins(pluginsPath);
  
          final List<ValidationMessage> messages = <ValidationMessage>[];
          plugins.validatePackage(messages,
              <String>['flutter-intellij', 'flutter-intellij.jar'], 'Flutter',
              minVersion: IntelliJPlugins.kMinFlutterPluginVersion);
          plugins.validatePackage(messages, <String>['Dart'], 'Dart');
  
          ValidationMessage message = messages
              .firstWhere((ValidationMessage m) => m.message.startsWith('Dart '));
  
negative.code:         message = messages.firstWhere(
              (ValidationMessage m) => m.message.startsWith('Flutter '));
          expect(message.message, contains('Flutter plugin not installed'));
        }, overrides: <Type, Generator>{
          FileSystem: () => fs,
        });
      });
    });
  }
  
  const String _kPluginsPath = '/data/intellij/plugins';
  
  Archive buildSingleFileArchive(String path, String content) {
    final Archive archive = new Archive();
  
    final List<int> bytes = utf8.encode(content);
    archive.addFile(new ArchiveFile(path, bytes.length, bytes));
  
    return archive;
  }
  