anchor.diff:  import 'package:flutter_tools/src/build_info.dart';
   import 'package:flutter_tools/src/compile.dart';
   import 'package:flutter_tools/src/convert.dart';
  -import 'package:mockito/mockito.dart';
   import 'package:package_config/package_config.dart';
   import 'package:process/process.dart';
  +import 'package:test/fake.dart';
   
   import '../src/common.dart';
   import '../src/fake_process_manager.dart';
   import '../src/fakes.dart';
   
   void main() {
  -  ProcessManager mockProcessManager;
  +  FakeProcessManager processManager;
     ResidentCompiler generator;
  -  MockProcess mockFrontendServer;
     MemoryIOSink frontendServerStdIn;
     StreamController<String> stdErrStreamController;
     BufferLogger testLogger;
  
positive.code: 
    setUp(() {
      testLogger = BufferLogger.test();
      mockProcessManager = MockProcessManager();
      mockFrontendServer = MockProcess();
      frontendServerStdIn = MemoryIOSink();
      fileSystem = MemoryFileSystem.test();
      generator = ResidentCompiler(
        'sdkroot',
        buildMode: BuildMode.debug,
        artifacts: Artifacts.test(),
        processManager: mockProcessManager,
        logger: testLogger,
        platform: FakePlatform(operatingSystem: 'linux'),
        fileSystem: fileSystem,
      );
  
      stdErrStreamController = StreamController<String>();
      when(mockFrontendServer.stdin).thenReturn(frontendServerStdIn);
      when(mockFrontendServer.stderr)
          .thenAnswer((Invocation invocation) => stdErrStreamController.stream.transform(utf8.encoder));
      when(mockFrontendServer.exitCode).thenAnswer((Invocation invocation) {
        return Completer<int>().future;
      });
  
      when(mockProcessManager.canRun(any)).thenReturn(true);
      when(mockProcessManager.start(any)).thenAnswer(
              (Invocation invocation) =>
          Future<Process>.value(mockFrontendServer)
      );
    });
  
    testWithoutContext('compile expression fails if not previously compiled', () async {
  
negative.code:       ..createSync(recursive: true)
        ..writeAsBytesSync(<int>[1, 2, 3, 4]);
  
      processManager.process.stdout = Stream<List<int>>.fromFutures(
        <Future<List<int>>>[
          compileResponseCompleter.future,
          compileExpressionResponseCompleter.future]);
      compileResponseCompleter.complete(Future<List<int>>.value(utf8.encode(
        'result abc\nline1\nline2\nabc\nabc /path/to/main.dart.dill 0\n'
      )));
  