anchor.diff:      String path = convertPath('/home/test/lib/test.dart');
       addSource(path, 'String f() {}');
   
  -    CompilationUnit unit = (await driver.getResult(path))?.unit;
  -    FunctionDeclaration function = unit.declarations[0] as FunctionDeclaration;
  -    TypeAnnotation type = function.returnType;
  +    var resolvedUnit = await driver.getResult(path);
  +    var findNode = FindNode(resolvedUnit.content, resolvedUnit.unit);
  +    var type = findNode.typeAnnotation('String');
   
       DartChangeBuilderImpl builder = newBuilder();
       await builder.addFileEdit(path, (FileEditBuilder builder) {
         (builder as DartFileEditBuilder)
  -          .replaceTypeWithFuture(type, typeProvider);
  +          .replaceTypeWithFuture(type, resolvedUnit.typeProvider);
       });
       List<SourceEdit> edits = getEdits(builder);
       expect(edits, hasLength(1));
  
positive.code: import 'package:analyzer/src/dart/element/inheritance_manager3.dart';
  import 'package:analyzer/src/generated/resolver.dart';
  import 'package:analyzer/src/generated/source.dart';
  import 'package:analyzer/src/generated/testing/test_type_provider.dart';
  import 'package:analyzer_plugin/protocol/protocol_common.dart';
  import 'package:analyzer_plugin/src/utilities/change_builder/change_builder_dart.dart';
  import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
  
negative.code:     String path = convertPath('/home/test/lib/test.dart');
      addSource(path, 'String f() {}');
  
      var resolvedUnit = await driver.getResult(path);
      var findNode = FindNode(resolvedUnit.content, resolvedUnit.unit);
      var body = findNode.functionBody('{}');
  
      DartChangeBuilderImpl builder = newBuilder();
      await builder.addFileEdit(path, (FileEditBuilder builder) {
        (builder as DartFileEditBuilder)
            .convertFunctionFromSyncToAsync(body, resolvedUnit.typeProvider);
      });
      List<SourceEdit> edits = getEdits(builder);
      expect(edits, hasLength(2));
  