anchor.diff:            '))))))))))',
             '#0      Object.noSuchMethod (dart:core-patch/dart:core/object_patch.dart:46)',
           ]);
  +        expect(fakeProcessManager.hasRemainingExpectations, isFalse);
         }, overrides: <Type, Generator>{
  -        ProcessManager: () => mockProcessManager,
  +        ProcessManager: () => fakeProcessManager,
           FileSystem: () => fileSystem,
           Platform: () => osx,
         });
   
  -      testUsingContext('log reader handles multiline messages', () async {
  -        when(mockProcessManager.start(any, environment: null, workingDirectory: null))
  -          .thenAnswer((Invocation invocation) {
  -          final Process mockProcess = MockProcess();
  -          when(mockProcess.stdout)
  -            .thenAnswer((Invocation invocation) {
  -            // Messages from 2017 should pass through, 2020 message should not
  -            return Stream<List<int>>.fromIterable(<List<int>>['''
  +      testUsingContext('multiline messages', () async {
  +        fakeProcessManager
  +          ..addCommand(const FakeCommand(
  +            command:  <String>['tail', '-n', '0', '-F', 'system.log'],
  +            stdout: '''
   2017-09-13 15:26:57.228948-0700  localhost Runner[37195]: (Flutter) Single line message
   2017-09-13 15:26:57.228948-0700  localhost Runner[37195]: (Flutter) Multi line message
     continues...
  
positive.code:   and goes...
  2017-09-13 15:36:57.228948-0700  localhost Runner[37195]: (Flutter) Single line message, not the part of the above
  '''
                .codeUnits]);
            });
            when(mockProcess.stderr)
              .thenAnswer((Invocation invocation) => const Stream<List<int>>.empty());
            // Delay return of exitCode until after stdout stream data, since it terminates the logger.
            when(mockProcess.exitCode)
              .thenAnswer((Invocation invocation) => Future<int>.delayed(Duration.zero, () => 0));
            return Future<Process>.value(mockProcess);
          });
  
          final IOSSimulator device = IOSSimulator(
            '123456',
  
negative.code:           'Single line message', 'Multi line message\n  continues...\n  continues...',
            'Single line message, not the part of the above'
          ]);
          expect(fakeProcessManager.hasRemainingExpectations, isFalse);
        }, overrides: <Type, Generator>{
          ProcessManager: () => fakeProcessManager,
          FileSystem: () => fileSystem,
        });
      });
  