anchor.diff:      });
   
       testWithoutContext('when writing to a full device', () async {
  -      setupWriteMocks(
  -        mockFileSystem: mockFileSystem,
  -        fs: fs,
  -        errorCode: enospc,
  -      );
  -
  -      final File file = fs.file('file');
  +      final ErrorHandlingFileSystem fileSystem = ErrorHandlingFileSystem(
  +        delegate: MemoryFileSystem.test(opHandle: exceptionHandler.opHandle),
  +        platform: macOSPlatform,
  +      );
  +      final File file = fileSystem.file('file');
  +
  +      exceptionHandler.addError(
  +        file,
  +        FileSystemOp.write,
  +        FileSystemException('', file.path, const OSError('', enospc)),
  +      );
   
         const String expectedMessage = 'The target device is full';
         expect(() async => file.writeAsBytes(<int>[0]),
  
positive.code:     });
  
      testWithoutContext('when writing to a full device', () async {
        setupWriteMocks(
          mockFileSystem: mockFileSystem,
          fs: fs,
          errorCode: enospc,
        );
  
        final File file = fs.file('file');
  
        const String expectedMessage = 'The target device is full';
        expect(() async => file.writeAsBytes(<int>[0]),
  
negative.code:     });
  
      testWithoutContext('copySync handles error if createSync on destination file fails', () {
        fileSystem.file('source').createSync();
        final File dest = fileSystem.file('dest');
  
        exceptionHandler.addError(
          dest,
          FileSystemOp.create,
          FileSystemException('', dest.path, const OSError('', eaccess)),
        );
  
        const String expectedMessage =
            'Flutter failed to copy source to dest due to destination location error.\n'
  