anchor.diff:  
       await loadNetworkImage();
       expect(capturedErrors, <dynamic>['client1']);
  -    final _MockHttpClient client2 = _MockHttpClient();
  -    when(client2.getUrl(any)).thenThrow('client2');
  +    final _FakeHttpClient client2 = _FakeHttpClient();
  +    client2.thrownError = 'client2';
       debugNetworkImageHttpClientProvider = () => client2;
       await loadNetworkImage();
       expect(capturedErrors, <dynamic>['client1', 'client2']);
     }, skip: isBrowser); // Browser implementation does not use HTTP client but an <img> tag.
   
     test('Propagates http client errors during resolve()', () async {
  -    when(httpClient.getUrl(any)).thenThrow(Error());
  +    httpClient.thrownError = Error();
       bool uncaught = false;
   
       final FlutterExceptionHandler oldError = FlutterError.onError;
  
positive.code: import 'package:flutter/foundation.dart';
  import 'package:flutter/painting.dart';
  import 'package:flutter_test/flutter_test.dart';
  import 'package:mockito/mockito.dart';
  
  import '../rendering/rendering_tester.dart';
  import 'image_data.dart';
  
  
negative.code:         Uint8List.fromList(kTransparentImage.skip(offset).take(chunkSize).toList()),
      ];
      final Completer<void> imageAvailable = Completer<void>();
  
      httpClient.request.response
        ..statusCode = HttpStatus.ok
        ..contentLength = kTransparentImage.length
        ..content = chunks;
  
      final ImageProvider imageProvider = NetworkImage(nonconst('foo'));
      final ImageStream result = imageProvider.resolve(ImageConfiguration.empty);
  