anchor.diff:  
   const _generator = const JsonGenerator();
   
  -Element _getClassForCodeString(String source, String name) =>
  -    _getElementsForCodeString(source).singleWhere((e) => e.name == name);
  +Element _getClassForCodeString(String name) =>
  +    _getElementsForCodeString().singleWhere((e) => e.name == name);
   
  -Iterable<Element> _getElementsForCodeString(String source) {
  -  var cu =
  -      _getCompilationUnitForString(getPackagePath(), _classNoFieldsContent);
  +Iterable<Element> _getElementsForCodeString() {
  +  if (_compUnit == null) {
  +    _compUnit = _getCompilationUnitForString(getPackagePath());
  +  }
   
  -  return getElementsFromCompilationUnit(cu);
  +  return getElementsFromCompilationUnit(_compUnit);
   }
   
  -CompilationUnit _getCompilationUnitForString(
  -    String projectPath, String content) {
  -  Source source = new StringSource(content, 'test content');
  +CompilationUnit _getCompilationUnitForString(String projectPath) {
  +  Source source = new StringSource(_testSource, 'test content');
   
     var context = getAnalysisContextForProjectPath(projectPath);
   
  
positive.code: 
    group('valid inputs', () {
      test('class with no fields', () {
        var element = _getClassForCodeString(_classNoFieldsContent, 'Person');
        var output = _generator.generate(element);
  
        expect(output, isNotNull);
  
negative.code: void main() {
    group('non-classes', () {
      test('const field', () {
        var element = _getClassForCodeString('theAnswer');
  
        expect(() => _generator.generate(element), throws);
        // TODO: validate the properties on the thrown error
      });
  
      test('method', () {
        var element = _getClassForCodeString('annotatedMethod');
  
        expect(() => _generator.generate(element), throws);
        // TODO: validate the properties on the thrown error
  