anchor.diff:      });
   
       testWithoutContext(' does not throw on allowed Failures', () async {
  -      when(mockProcessManager.runSync(<String>['kaboom'])).thenReturn(
  -        ProcessResult(0, 1, '', '')
  -      );
  +      fakeProcessManager.addCommand(const FakeCommand(
  +        command: <String>[
  +          'kaboom',
  +        ],
  +        exitCode: 1,
  +      ));
         expect(
           processUtils.runSync(
             <String>['kaboom'],
  
positive.code:         outputPreferences: OutputPreferences(wrapText: true, wrapColumn: 40),
        );
        processUtils = ProcessUtils(
          processManager: mockProcessManager,
          logger: testLogger,
        );
      });
  
      testWithoutContext(' succeeds on success', () async {
        when(mockProcessManager.runSync(<String>['whoohoo'])).thenReturn(
          ProcessResult(0, 0, '', '')
        );
        expect(processUtils.runSync(<String>['whoohoo']).exitCode, 0);
      });
  
      testWithoutContext(' fails on failure', () async {
        when(mockProcessManager.runSync(<String>['boohoo'])).thenReturn(
          ProcessResult(0, 1, '', '')
        );
        expect(processUtils.runSync(<String>['boohoo']).exitCode, 1);
      });
  
      testWithoutContext('throws on failure with throwOnError', () async {
        const String stderr = 'Something went wrong.';
        when(mockProcessManager.runSync(<String>['kaboom'])).thenReturn(
          ProcessResult(0, 1, '', stderr),
        );
        try {
          processUtils.runSync(<String>['kaboom'], throwOnError: true);
          fail('ProcessException expected.');
  
negative.code:     });
  
      testWithoutContext(' succeeds on success', () async {
        fakeProcessManager.addCommand(const FakeCommand(
          command: <String>[
            'whoohoo',
          ],
        ));
        expect((await processUtils.run(<String>['whoohoo'])).exitCode, 0);
      });
  
      testWithoutContext(' fails on failure', () async {
        fakeProcessManager.addCommand(const FakeCommand(
          command: <String>[
            'boohoo',
          ],
          exitCode: 1,
        ));
        expect((await processUtils.run(<String>['boohoo'])).exitCode, 1);
      });
  
      testWithoutContext(' throws on failure with throwOnError', () async {
        fakeProcessManager.addCommand(const FakeCommand(
          command: <String>[
            'kaboom',
          ],
          exitCode: 1,
        ));
        expect(() => processUtils.run(<String>['kaboom'], throwOnError: true),
               throwsA(isA<ProcessException>()));
      });
  
      testWithoutContext(' does not throw on allowed Failures', () async {
        fakeProcessManager.addCommand(const FakeCommand(
          command: <String>[
            'kaboom',
          ],
          exitCode: 1,
        ));
        expect(
          (await processUtils.run(
            <String>['kaboom'],
  