anchor.diff:    return context.resolveCompilationUnit(source, libElement);
   }
   
  -const _classNoFieldsContent = r'''
  +CompilationUnit _compUnit;
  +
  +const _testSource = r'''
   import 'package:source_gen/json_serial/json_annotation.dart';
   
   @JsonSerializable()
  
positive.code:   });
  
    test('unannotated classes no-op', () {
      var element = _getClassForCodeString(_classNoFieldsContent, 'NoAnnotation');
      var output = _generator.generate(element);
  
      expect(output, isNull);
  
negative.code: 
  const _generator = const JsonGenerator();
  
  Element _getClassForCodeString(String name) =>
      _getElementsForCodeString().singleWhere((e) => e.name == name);
  
  Iterable<Element> _getElementsForCodeString() {
    if (_compUnit == null) {
      _compUnit = _getCompilationUnitForString(getPackagePath());
    }
  
    return getElementsFromCompilationUnit(_compUnit);
  }
  
  CompilationUnit _getCompilationUnitForString(String projectPath) {
    Source source = new StringSource(_testSource, 'test content');
  
    var context = getAnalysisContextForProjectPath(projectPath);
  
  