anchor.diff:      index.indexDeclarations(testUnit);
     }
   
  +  test_indexUnit_nullLibraryElement() async {
  +    resolveTestUnit('');
  +    CompilationUnitElement unitElement = new _CompilationUnitElementMock();
  +    expect(unitElement.library, isNull);
  +    testUnit.element = unitElement;
  +    index.indexUnit(testUnit);
  +  }
  +
     test_indexUnit_nullUnit() async {
       index.indexUnit(null);
     }
  
positive.code: import 'package:analyzer/src/generated/source.dart';
  import 'package:analyzer/src/summary/idl.dart';
  import 'package:test_reflective_loader/test_reflective_loader.dart';
  import 'package:unittest/unittest.dart';
  
  import '../../abstract_single_unit.dart';
  
negative.code:     return source;
    }
  }
  
  class _CompilationUnitElementMock extends TypedMock
      implements CompilationUnitElement {}
  