hunk.code_window:     expect(fileString).toContain(expectedImports);
     });
     it('should add correct imports based on canActivate guardType', async () => {
       const options = { ...defaultOptions, guardType: 'canActivate' };
       const tree = await schematicRunner.runSchematicAsync('guard', options, appTree).toPromise();
       const fileString = tree.readContent('/projects/bar/src/app/foo.guard.ts');
       const expectedImports = `import { CanActivateFn } from '@angular/router';`;
  
hunk.labels: keep keep keep replace replace keep keep keep keep
hunk.after_edit:   it('should add correct imports based on canActivate functional guard', async () => {
       const options = { ...defaultOptions, implements: ['CanActivate'], functional: true };
  
hunk.file_path: packages/schematics/angular/guard/index_spec.ts
hunk.type: replace
file: /**
   * @license
   * Copyright Google LLC All Rights Reserved.
   *
   * Use of this source code is governed by an MIT-style license that can be
   * found in the LICENSE file at https://angular.io/license
   */
  
  import { SchematicsException } from '../exception/exception';
  import { FilterHostTree, HostTree } from './host-tree';
  import { FilePredicate, MergeStrategy, Tree } from './interface';
  
  export function empty() {
    return new HostTree();
  }
  
  export function branch(tree: Tree) {
    return tree.branch();
  }
  
  export function merge(tree: Tree, other: Tree, strategy: MergeStrategy = MergeStrategy.Default) {
    tree.merge(other, strategy);
  
    return tree;
  }
  
  export function partition(tree: Tree, predicate: FilePredicate<boolean>): [Tree, Tree] {
    if (tree instanceof HostTree) {
      return [
        new FilterHostTree(tree, predicate),
        new FilterHostTree(tree, (path, entry) => !predicate(path, entry)),
      ];
    } else {
      throw new SchematicsException('Tree type is not supported.');
    }
  }
  