anchor.diff:    });
   
     test('reads JsonKey annotations', () async {
  -    var element = await _getClassForCodeString('Person');
  -    var output = await _generator.generate(element, null);
  +    var output = await _runForElementNamed('Person');
   
       expect(output, contains("'h': height,"));
       expect(output, contains("..height = json['h']"));
  
positive.code:   });
  
    test('class with final fields', () async {
      var element = await _getClassForCodeString('FinalFields');
      var generateResult = await _generator.generate(element, null);
      expect(generateResult, contains("Map<String, dynamic> toJson()"));
    });
  
    test('unannotated classes no-op', () async {
      var element = await _getClassForCodeString('NoAnnotation');
      var output = _generator.generate(element, null);
  
      expect(output, isNull);
    });
  
    group('valid inputs', () {
      test('class with no fields', () async {
        var element = await _getClassForCodeString('Person');
        var output = await _generator.generate(element, null);
  
        expect(output, isNotNull);
  
  
negative.code:     });
  
      test('class with child json-able object', () async {
        var output = await _runForElementNamed('ParentObject');
  
        expect(output, contains('new ChildObject.fromJson'));
      });
  
      test('class with child list of json-able objects', () async {
        var output = await _runForElementNamed('ParentObjectWithChildren');
  
        expect(output, contains('.toList()'));
        expect(output, contains('new ChildObject.fromJson'));
      });
  
      test('class with child list of dynamic objects is left alone', () async {
        var output = await _runForElementNamed('ParentObjectWithDynamicChildren');
  
        expect(output, contains('children = json[\'children\'] as List;'));
      });
  
      test('class with list of int is cast for strong mode', () async {
        var output = await _runForElementNamed('Person');
  
        expect(output,
            contains("json['listOfInts'] as List)?.map((v0) => v0 as int)"));
  