anchor.diff:            '10',
           ]), throwsToolExit(message: '--device-user is only supported for Android. At least one Android device is required.'));
         }, overrides: <Type, Generator>{
  -        FileSystem: () => MemoryFileSystem.test(),
  +        FileSystem: () => fs,
           ProcessManager: () => FakeProcessManager.any(),
           DeviceManager: () => mockDeviceManager,
           Stdio: () => FakeStdio(),
  +        Cache: () => Cache.test(processManager: FakeProcessManager.any()),
         });
   
         testUsingContext('shows unsupported devices when no supported devices are found',  () async {
           final RunCommand command = RunCommand();
  -
  -        final MockDevice mockDevice = MockDevice(TargetPlatform.android_arm);
  -        when(mockDevice.isLocalEmulator).thenAnswer((Invocation invocation) => Future<bool>.value(true));
  -        when(mockDevice.isSupported()).thenAnswer((Invocation invocation) => true);
  -        when(mockDevice.supportsFastStart).thenReturn(true);
  -        when(mockDevice.id).thenReturn('mock-id');
  -        when(mockDevice.name).thenReturn('mock-name');
  -        when(mockDevice.platformType).thenReturn(PlatformType.android);
  -        when(mockDevice.targetPlatformDisplayName)
  -            .thenAnswer((Invocation invocation) async => 'mock-platform');
  -        when(mockDevice.sdkNameAndVersion).thenAnswer((Invocation invocation) => Future<String>.value('api-14'));
  -
  -        when(mockDeviceManager.getDevices()).thenAnswer((Invocation invocation) {
  -          return Future<List<Device>>.value(<Device>[
  -            mockDevice,
  -          ]);
  -        });
  -
  -        when(mockDeviceManager.findTargetDevices(any, timeout: anyNamed('timeout'))).thenAnswer(
  -            (Invocation invocation) => Future<List<Device>>.value(<Device>[]),
  -        );
  +        final FakeDevice mockDevice = FakeDevice(targetPlatform: TargetPlatform.android_arm, isLocalEmulator: true, sdkNameAndVersion: 'api-14');
  +        mockDeviceManager
  +          ..devices = <Device>[mockDevice]
  +          ..targetDevices = <Device>[];
   
           await expectLater(
             () => createTestCommandRunner(command).run(<String>[
  
positive.code:       '--no-pub',
        '--bundle-sksl-path=foo.json',
      ]), throwsToolExit(message: 'No SkSL shader bundle found at foo.json'));
    });
  
    testUsingContext('Configures web connection options to use web sockets by default', () async {
  
negative.code:     });
  
      testUsingContext('should only request artifacts corresponding to connected devices', () async {
        mockDeviceManager.devices = <Device>[FakeDevice(targetPlatform: TargetPlatform.android_arm)];
  
        expect(await RunCommand().requiredArtifacts, unorderedEquals(<DevelopmentArtifact>{
          DevelopmentArtifact.universal,
          DevelopmentArtifact.androidGenSnapshot,
        }));
  
        mockDeviceManager.devices = <Device>[FakeDevice(targetPlatform: TargetPlatform.ios)];
  
        expect(await RunCommand().requiredArtifacts, unorderedEquals(<DevelopmentArtifact>{
          DevelopmentArtifact.universal,
          DevelopmentArtifact.iOS,
        }));
  
        mockDeviceManager.devices = <Device>[
          FakeDevice(targetPlatform: TargetPlatform.ios),
          FakeDevice(targetPlatform: TargetPlatform.android_arm),
        ];
  
        expect(await RunCommand().requiredArtifacts, unorderedEquals(<DevelopmentArtifact>{
          DevelopmentArtifact.universal,
  