anchor.diff:      final Completer<List<int>> compileExpressionResponseCompleter1 = Completer<List<int>>();
       final Completer<List<int>> compileExpressionResponseCompleter2 = Completer<List<int>>();
   
  -    when(mockFrontendServer.stdout)
  -        .thenAnswer((Invocation invocation) =>
  -    Stream<List<int>>.fromFutures(
  -        <Future<List<int>>>[
  -          compileResponseCompleter.future,
  -          compileExpressionResponseCompleter1.future,
  -          compileExpressionResponseCompleter2.future,
  -        ]));
  +
  +    processManager.process.stdout =
  +      Stream<List<int>>.fromFutures(
  +          <Future<List<int>>>[
  +            compileResponseCompleter.future,
  +            compileExpressionResponseCompleter1.future,
  +            compileExpressionResponseCompleter2.future,
  +          ]);
   
       // The test manages timing via completers.
       unawaited(
  
positive.code: 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 '../src/common.dart';
  import '../src/fake_process_manager.dart';
  import '../src/fakes.dart';
  
  void main() {
    ProcessManager mockProcessManager;
    ResidentCompiler generator;
    MockProcess mockFrontendServer;
    MemoryIOSink frontendServerStdIn;
    StreamController<String> stdErrStreamController;
    BufferLogger testLogger;
  
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'
      )));
  