public ExternalIssueReport parse(Path reportPath) {
    try (Reader reader = Files.newBufferedReader(reportPath, StandardCharsets.UTF_8)) {
      ExternalIssueReport report = gson.fromJson(reader, ExternalIssueReport.class);
      externalIssueReportValidator.validate(report, reportPath);
      return report;
    } catch (JsonIOException | IOException e) {
      throw new IllegalStateException("Failed to read external issues report '" + reportPath + "'", e);
    } catch (JsonSyntaxException e) {
      throw new IllegalStateException("Failed to read external issues report '" + reportPath + "': invalid JSON syntax", e);
    }
  }
@Test
  public void parse_whenCorrectDeprecatedFormat_shouldParseCorrectly() {
    reportPath = Paths.get(DEPRECATED_REPORTS_LOCATION + "report.json");

    ExternalIssueReport report = externalIssueReportParser.parse(reportPath);

    verify(validator).validate(report, reportPath);
    assertDeprecatedReport(report);
  }