@Test
void shouldCreatePriorityChartWithErrors() {

    SeverityTrendChart chart = new SeverityTrendChart();
    List<BuildResult<AnalysisBuildResult>> results = new ArrayList<>();
    results.add(createResult(2, 8, 2, 4, 6));
    results.add(createResult(1, 5, 1, 2, 3));
    LinesChartModel model = chart.create(results, new ChartModelConfiguration());
    verifySeries(model.getSeries().get(0), Severity.WARNING_LOW, 3, 6);
    verifySeries(model.getSeries().get(1), Severity.WARNING_NORMAL, 2, 4);
    verifySeries(model.getSeries().get(2), Severity.WARNING_HIGH, 1, 2);
    verifySeries(model.getSeries().get(3), Severity.ERROR, 5, 8);
    assertThatJson(model).node("domainAxisLabels")
            .isArray().hasSize(2).containsExactly("#1", "#2");
    assertThatJson(model).node("buildNumbers")
            .isArray().hasSize(2).containsExactly(1, 2);
    assertThatJson(model).node("series")
            .isArray().hasSize(4);
}