anchor.diff:          DeviceManager: () => mockDeviceManager,
           FileSystem: () => fs,
           ProcessManager: () => FakeProcessManager.any(),
  +        Cache: () => Cache.test(processManager: FakeProcessManager.any()),
         });
   
         testUsingContext('fails when targeted device is not Android with --device-user', () async {
  -        globals.fs.file('pubspec.yaml').createSync();
  -        globals.fs.file('.packages').writeAsStringSync('\n');
  -        globals.fs.file('lib/main.dart').createSync(recursive: true);
  +        fs.file('pubspec.yaml').createSync();
  +        fs.file('.packages').writeAsStringSync('\n');
  +        fs.file('lib/main.dart').createSync(recursive: true);
           final FakeDevice device = FakeDevice(isLocalEmulator: true);
  -        when(mockDeviceManager.getAllConnectedDevices()).thenAnswer((Invocation invocation) async {
  -          return <Device>[device];
  -        });
  -        when(mockDeviceManager.getDevices()).thenAnswer((Invocation invocation) async {
  -          return <Device>[device];
  -        });
  -        when(mockDeviceManager.findTargetDevices(any, timeout: anyNamed('timeout'))).thenAnswer((Invocation invocation) async {
  -          return <Device>[device];
  -        });
  -        when(mockDeviceManager.hasSpecifiedAllDevices).thenReturn(false);
  -        when(mockDeviceManager.deviceDiscoverers).thenReturn(<DeviceDiscovery>[]);
  +
  +        mockDeviceManager
  +          ..devices = <Device>[device]
  +          ..targetDevices = <Device>[device];
   
           final RunCommand command = RunCommand();
           await expectLater(createTestCommandRunner(command).run(<String>[
  
positive.code:     bool ipv6 = false,
      String userIdentifier,
    }) async {
      final String dartFlags = debuggingOptions.dartFlags;
      // In release mode, --dart-flags should be set to the empty string and
      // provided flags should be dropped. In debug and profile modes,
  
negative.code:       'run',
        '--no-pub',
      ]), throwsA(isA<RPCError>()));
    }, overrides: <Type, Generator>{
      Cache: () => Cache.test(processManager: FakeProcessManager.any()),
      FileSystem: () => MemoryFileSystem.test(),
      ProcessManager: () => FakeProcessManager.any(),
    });
  
    testUsingContext('Passes sksl bundle info the build options', () async {
  