anchor.diff:      testUsingContext('with traceStartup, env variable', () async {
         fakePlatform.environment[kFlutterTestOutputsDirEnvName] = 'test_output_dir';
   
  -      final MockDevice mockDevice = MockDevice();
  -      final MockFlutterDevice mockFlutterDevice = MockFlutterDevice();
  -      when(mockFlutterDevice.device).thenReturn(mockDevice);
  -      when(mockFlutterDevice.runCold(
  -          coldRunner: anyNamed('coldRunner'),
  -          route: anyNamed('route')
  -      )).thenAnswer((Invocation invocation) => Future<int>.value(0));
  -      final List<FlutterDevice> devices = <FlutterDevice>[mockFlutterDevice];
  +      final FakeDevice device = FakeDevice();
  +      final FakeFlutterDevice flutterDevice = FakeFlutterDevice(device);
  +      final List<FlutterDevice> devices = <FlutterDevice>[flutterDevice];
         final File applicationBinary = MemoryFileSystem.test().file('binary');
         final int result = await ColdRunner(
           devices,
  
positive.code: 
    @override
    FlutterVmService get vmService => FakeFlutterVmService();
  }
  class MockDevice extends Mock implements Device {
    MockDevice() {
      when(isSupported()).thenReturn(true);
    }
  }
  
  
negative.code:   });
  
    group('cleanupAtFinish()', () {
      testUsingContext('disposes each device', () async {
        final FakeDevice device1 = FakeDevice();
        final FakeDevice device2 = FakeDevice();
        final FakeFlutterDevice flutterDevice1 = FakeFlutterDevice(device1);
        final FakeFlutterDevice flutterDevice2 = FakeFlutterDevice(device2);
  
        final List<FlutterDevice> devices = <FlutterDevice>[flutterDevice1, flutterDevice2];
  
        await ColdRunner(devices,
          debuggingOptions: DebuggingOptions.enabled(BuildInfo.debug),
          target: 'main.dart',
        ).cleanupAtFinish();
  
        expect(flutterDevice1.stopEchoingDeviceLogCount, 1);
        expect(flutterDevice2.stopEchoingDeviceLogCount, 1);
        expect(device2.wasDisposed, true);
        expect(device1.wasDisposed, true);
      });
    });
  
  