anchor.diff:      MockGoogleApiDart mockGoogleApiDart;
       MockExcelDart mockExcelDart;
   
  -    List<InsertionOrder> expectedInput;
       Completer<String> reportCompleter;
   
       setUp(() async {
  
positive.code:         await queryComponentPO.selectUnderpacing();
          await queryComponentPO.clickPopulate();
  
          // waits for the last operation execReportingDownload() to finish.
          await fixture
              .update((_) => reportCompleter.complete(generateReport(report1)));
          verify(mockExcelDart.populate(any, true));
  
negative.code:         when(mockGoogleApiDart
                  .request(argThat(isReportingDownloadRequestWith(downloadLink))))
              .thenAnswer((_) => reportCompleter.future);
        });
  
        tearDown(() => clearInteractions(mockGoogleApiDart));
  
        test('no advertiser id and no io id disables the populate button',
            () async {
          await queryComponentPO.clickPopulate();
          verifyNever(mockGoogleApiDart.request(any));
        });
  
        test('no advertiser id disables the populate button', () async {
          await queryComponentAccordionPO.typeInsertionOrderId(ioId1);
          await queryComponentPO.clickPopulate();
          verifyNever(mockGoogleApiDart.request(any));
        });
  
        test('non-integer advertiser id disables the populate button', () async {
          await queryComponentAccordionPO.typeAdvertiserId('wrong-format-id');
          await queryComponentAccordionPO.typeInsertionOrderId(ioId1);
          await queryComponentPO.clickPopulate();
          verifyNever(mockGoogleApiDart.request(any));
        });
  
        test('no io id disables the populate button', () async {
          await queryComponentAccordionPO.typeAdvertiserId(advertiserId);
          await queryComponentPO.clickPopulate();
          verifyNever(mockGoogleApiDart.request(any));
        });
  
        test('non-integer io id disables the populate button', () async {
          await queryComponentAccordionPO.typeAdvertiserId(advertiserId);
          await queryComponentAccordionPO.typeInsertionOrderId('wrong-format-id');
          await queryComponentPO.clickPopulate();
          verifyNever(mockGoogleApiDart.request(any));
        });
  
        test('valid ids invokes populate() with correct IOs', () async {
          await queryComponentAccordionPO.typeAdvertiserId(advertiserId);
          await queryComponentAccordionPO.typeInsertionOrderId(ioId1);
          await queryComponentPO.clickPopulate();
  
          await fixture
              .update((_) => reportCompleter.complete(generateReport(report3)));
          final expectedInput = [
            generateInsertionOrder(
                advertiserId, mediaPlanId1, ioId1, startDate, endDate, spending1)
          ];
          verify(mockExcelDart.populate(expectedInput, any));
        });
  
        test('correct ids displays the spinner when populate() is running',
            () async {
          await queryComponentAccordionPO.typeAdvertiserId(advertiserId);
          await queryComponentAccordionPO.typeInsertionOrderId(ioId1);
          await queryComponentPO.clickPopulate();
  
          await fixture.update();
          expect(queryComponentPO.populateButtonSpinner, isVisible);
        });
  
        test('correct ids hides the spinner when populate() finishes running',
            () async {
          await queryComponentAccordionPO.typeAdvertiserId(advertiserId);
          await queryComponentAccordionPO.typeInsertionOrderId(ioId1);
          await queryComponentPO.clickPopulate();
  
          await fixture
              .update((_) => reportCompleter.complete(generateReport(report1)));
          expect(queryComponentPO.populateButtonSpinner, notExists);
  