anchor.diff:              })),
           applyToRoot(new TestBuilder(
               buildExtensions: replaceExtension('.txt', '.success'),
  -            build: (buildStep, __) async {
  +            build: expectAsync2((buildStep, __) async {
                 // Attempts to read the file that came from a failing build step and
                 // hides exception
                 var failedFile = buildStep.inputId.changeExtension('.failed');
  -              try {
  -                await buildStep.readAsString(failedFile);
  -              } catch (e) {
  -                exceptionCaught = true;
  -              }
  +              await expectLater(
  +                  buildStep.readAsString(failedFile), throwsA(anything));
                 await buildStep.writeAsString(
                     buildStep.inputId.changeExtension('.success'), 'success');
  -            }))
  +            })))
         ],
         {
           'a|lib/a.txt': '',
  
positive.code:       failOnSevere: true,
        status: BuildStatus.failure,
      );
  
      expect(exceptionCaught, true);
    });
  }
  
  
negative.code: 
    test('should throw an exception if a read is attempted on a failed file',
        () async {
      await testBuilders(
        [
          applyToRoot(new TestBuilder(
  