anchor.diff:          '''),
         },
         outputs: {
  -        'foo|test/foo_test.mocks.dart': dedent(r'''
  -        import 'package:mockito/mockito.dart' as _i1;
  -        import 'package:foo/foo.dart' as _i2;
  -
  -        /// A class which mocks [Foo].
  -        ///
  -        /// See the documentation for Mockito's code generation for more information.
  -        class MockFoo extends _i1.Mock implements _i2.Foo {}
  -        '''),
  +        'foo|test/foo_test.mocks.dart': _containsAllOf(
  +            'class MockFoo extends _i1.Mock implements _i2.Foo {}'),
         },
       );
     });
  
positive.code:   );
  }
  
  /// Expect that [testBuilder], given [assets], throws an
  /// [InvalidMockitoAnnotationException] with a message containing [message].
  void expectBuilderThrows(
  
negative.code:     );
    });
  
    test('creates dummy non-null bool return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          bool m() => false;
        }
        '''),
        _containsAllOf(
            'bool m() => super.noSuchMethod(Invocation.method(#m, []), false);'),
      );
    });
  
    test('creates dummy non-null double return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          double m() => 3.14;
        }
        '''),
        _containsAllOf(
            'double m() => super.noSuchMethod(Invocation.method(#m, []), 0.0);'),
      );
    });
  
    test('creates dummy non-null int return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          int m() => 7;
        }
        '''),
        _containsAllOf(
            'int m() => super.noSuchMethod(Invocation.method(#m, []), 0);'),
      );
    });
  
    test('creates dummy non-null String return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          String m() => "Hello";
        }
        '''),
        _containsAllOf(
            "String m() => super.noSuchMethod(Invocation.method(#m, []), '');"),
      );
    });
  
    test('creates dummy non-null List return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          List<Foo> m() => [Foo()];
        }
        '''),
        _containsAllOf(
            'List<_i2.Foo> m() => super.noSuchMethod(Invocation.method(#m, []), []);'),
      );
    });
  
    test('creates dummy non-null Set return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Set<Foo> m() => {Foo()};
        }
        '''),
        _containsAllOf(
            'Set<_i2.Foo> m() => super.noSuchMethod(Invocation.method(#m, []), {});'),
      );
    });
  
    test('creates dummy non-null Map return value', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Map<int, Foo> m() => {7: Foo()};
        }
        '''),
        _containsAllOf(
            'Map<int, _i2.Foo> m() => super.noSuchMethod(Invocation.method(#m, []), {});'),
      );
    });
  
    test('creates dummy non-null return values for Futures of known core classes',
        () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Future<bool> m1() async => false;
        }
        '''),
        _containsAllOf('_i3.Future<bool> m1() async =>',
            'super.noSuchMethod(Invocation.method(#m1, []), Future.value(false));'),
      );
    });
  
    test('creates dummy non-null return values for unknown classes', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Bar m() => Bar('name');
        }
        class Bar {
          final String name;
          Bar(this.name);
        }
        '''),
        _containsAllOf(
            '_i2.Bar m() => super.noSuchMethod(Invocation.method(#m, []), _FakeBar());'),
      );
    });
  
    test('deduplicates fake classes', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Bar m1() => Bar('name1');
          Bar m2() => Bar('name2');
        }
        class Bar {
          final String name;
          Bar(this.name);
        }
        '''),
        dedent(r'''
        import 'package:mockito/mockito.dart' as _i1;
        import 'package:foo/foo.dart' as _i2;
  
        class _FakeBar extends _i1.Fake implements _i2.Bar {}
  
        /// A class which mocks [Foo].
        ///
        /// See the documentation for Mockito's code generation for more information.
        class MockFoo extends _i1.Mock implements _i2.Foo {
          _i2.Bar m1() => super.noSuchMethod(Invocation.method(#m1, []), _FakeBar());
          _i2.Bar m2() => super.noSuchMethod(Invocation.method(#m2, []), _FakeBar());
        }
        '''),
      );
    });
  
    test('creates dummy non-null return values for enums', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Bar m1() => Bar('name');
        }
        enum Bar {
          one,
          two,
        }
        '''),
        _containsAllOf(
            '_i2.Bar m1() => super.noSuchMethod(Invocation.method(#m1, []), _i2.Bar.one);'),
      );
    });
  
    test(
        'creates a dummy non-null return function-typed value, with optional '
        'parameters', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          void Function(int, [String]) m() => (int i, [String s]) {};
        }
        '''),
        _containsAllOf('void Function(int, [String]) m() => super',
            '.noSuchMethod(Invocation.method(#m, []), (int __p0, [String __p1]) {});'),
      );
    });
  
    test(
        'creates a dummy non-null return function-typed value, with named '
        'parameters', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          void Function(Foo, {bool b}) m() => (Foo f, {bool b}) {};
        }
        '''),
        _containsAllOf('void Function(_i2.Foo, {bool b}) m() => super',
            '.noSuchMethod(Invocation.method(#m, []), (_i2.Foo __p0, {bool b}) {});'),
      );
    });
  
    test(
        'creates a dummy non-null return function-typed value, with non-core '
        'return type', () async {
      await _expectSingleNonNullableOutput(
        dedent(r'''
        class Foo {
          Foo Function() m() => () => Foo();
        }
        '''),
        _containsAllOf('_i2.Foo Function() m() =>',
            'super.noSuchMethod(Invocation.method(#m, []), () => _FakeFoo());'),
      );
    });
  
  