public void test_metadata_field() throws Exception {
   Source source =
       addSource(
           createSource( //
               "const A = null;", "class C {", "  @A int f;", "}"));
   LibraryElement library = resolve(source);
   assertNotNull(library);
   CompilationUnitElement unit = library.getDefiningCompilationUnit();
   assertNotNull(unit);
   ClassElement[] classes = unit.getTypes();
   assertLength(1, classes);
   FieldElement field = classes[0].getFields()[0];
   ElementAnnotation[] annotations = field.getMetadata();
   assertLength(1, annotations);
   assertNoErrors(source);
   verify(source);
 }