@Override
  public void execute(SensorContext context) {
    Set<String> reportPaths = loadReportPaths();
    Map<String, SarifImportResults> filePathToImportResults = new HashMap<>();

    for (String reportPath : reportPaths) {
      try {
        SarifImportResults sarifImportResults = processReport(context, reportPath);
        filePathToImportResults.put(reportPath, sarifImportResults);
      } catch (NoSuchFileException e) {
        throw MessageException.of(format("SARIF report file not found: %s", e.getFile()));
      } catch (Exception exception) {
        LOG.warn("Failed to process SARIF report from file '{}', error: '{}'", reportPath, exception.getMessage());
      }
    }
    filePathToImportResults.forEach(SarifIssuesImportSensor::displayResults);
  }
@Test
  public void execute_whenDeserializationThrowsMessageException_shouldRethrow() throws NoSuchFileException {
    sensorSettings.setProperty("sonar.sarifReportPaths", FILE_1);

    NoSuchFileException e = new NoSuchFileException("non-existent");
    failDeserializingReportWithException(FILE_1, e);

    SarifIssuesImportSensor sensor = new SarifIssuesImportSensor(sarifSerializer, sarifImporter, sensorSettings.asConfig());
    assertThatThrownBy(() -> sensor.execute(sensorContext))
      .isInstanceOf(MessageException.class)
      .hasMessage("SARIF report file not found: non-existent");

  }