@Test
void shouldHaveNotMoreValuesThatAllowed() {

    SeverityTrendChart chart = new SeverityTrendChart();
    ChartModelConfiguration configuration = mock(ChartModelConfiguration.class);
    when(configuration.getBuildCount()).thenReturn(3);
    when(configuration.getAxisType()).thenReturn(AxisType.BUILD);
    when(configuration.isBuildCountDefined()).thenReturn(true);
    List<BuildResult<AnalysisBuildResult>> results = new ArrayList<>();
    results.add(createResult(4, 4000, 400, 40, 4));
    results.add(createResult(3, 3000, 300, 30, 3));
    results.add(createResult(2, 2000, 200, 20, 2));
    results.add(createResult(1, 1000, 100, 10, 1));
    LinesChartModel model = chart.create(results, configuration);
    verifySeries(model.getSeries().get(3), Severity.ERROR, 2000, 3000, 4000);
    verifySeries(model.getSeries().get(2), Severity.WARNING_HIGH, 200, 300, 400);
    verifySeries(model.getSeries().get(1), Severity.WARNING_NORMAL, 20, 30, 40);
    verifySeries(model.getSeries().get(0), Severity.WARNING_LOW, 2, 3, 4);
    assertThatJson(model).node("domainAxisLabels")
            .isArray().hasSize(3).containsExactly("#2", "#3", "#4");
    assertThatJson(model).node("buildNumbers")
            .isArray().hasSize(3).containsExactly(2, 3, 4);
    assertThatJson(model).node("series")
            .isArray().hasSize(4);
}