code: public ReportView isReportFinishedGenerating(String reportUri) throws InterruptedException, IntegrationException {
          long startTime = System.currentTimeMillis();
          long elapsedTime = 0;
          Date timeFinished = null;
          ReportView reportInfo = null;
  
          while (timeFinished == null) {
              reportInfo = blackDuckService.getResponse(reportUri, ReportView.class);
              timeFinished = reportInfo.getFinishedAt();
              if (timeFinished != null) {
                  break;
              }
              if (elapsedTime >= timeoutInMilliseconds) {
                  String formattedTime = String.format("%d minutes", TimeUnit.MILLISECONDS.toMinutes(timeoutInMilliseconds));
                  throw new BlackDuckIntegrationException("The Report has not finished generating in : " + formattedTime);
              }
              // Retry every 5 seconds
              Thread.sleep(5000);
              elapsedTime = System.currentTimeMillis() - startTime;
          }
          return reportInfo;
      }
docs: Checks the report URL every 5 seconds until the report has a finished time available, then we know it is done being generated. Throws BlackDuckIntegrationException after 30 minutes if the report has not been generated yet.