anchor.diff:    });
   
     group('cleanupAtFinish()', () {
  -    MockFlutterDevice mockFlutterDeviceFactory(Device device) {
  -      final MockFlutterDevice mockFlutterDevice = MockFlutterDevice();
  -      when(mockFlutterDevice.device).thenReturn(device);
  -      return mockFlutterDevice;
  -    }
  -
       testUsingContext('disposes each device', () async {
  -      final MockDevice mockDevice1 = MockDevice();
  -      final MockDevice mockDevice2 = MockDevice();
  -      final MockFlutterDevice mockFlutterDevice1 = mockFlutterDeviceFactory(mockDevice1);
  -      final MockFlutterDevice mockFlutterDevice2 = mockFlutterDeviceFactory(mockDevice2);
  -
  -      final List<FlutterDevice> devices = <FlutterDevice>[mockFlutterDevice1, mockFlutterDevice2];
  +      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();
   
  -      verify(mockDevice1.dispose());
  -      expect(mockFlutterDevice1.stopEchoingDeviceLogCount, 1);
  -      verify(mockDevice2.dispose());
  -      expect(mockFlutterDevice2.stopEchoingDeviceLogCount, 1);
  +      expect(flutterDevice1.stopEchoingDeviceLogCount, 1);
  +      expect(flutterDevice2.stopEchoingDeviceLogCount, 1);
  +      expect(device2.wasDisposed, true);
  +      expect(device1.wasDisposed, true);
       });
     });
   
  
positive.code: import 'package:flutter_tools/src/tracing.dart';
  import 'package:flutter_tools/src/vmservice.dart';
  import 'package:meta/meta.dart';
  import 'package:mockito/mockito.dart';
  import 'package:vm_service/vm_service.dart';
  
  import '../src/common.dart';
  
negative.code:     testUsingContext('with traceStartup, env variable', () async {
        fakePlatform.environment[kFlutterTestOutputsDirEnvName] = 'test_output_dir';
  
        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,
  