@Test
void shouldProvideSummary() {

    AnalysisResult analysisResult = createAnalysisResult(
            Maps.fixedSize.of("checkstyle", 15, "pmd", 20), 2, 2,
            EMPTY_ERRORS, 1);
    Summary summary = createSummary(analysisResult);
    String actualSummary = summary.create();
    assertThat(actualSummary).contains("CheckStyle, PMD");
    assertThat(actualSummary).contains("No warnings for 2 builds");
    assertThat(actualSummary).contains("since build <a href=\"../1\" class=\"model-link inside\">1</a>");
    assertThat(actualSummary).containsPattern(
            createWarningsLink("<a href=\"test/new\">.*2 new warnings.*</a>"));
    assertThat(actualSummary).containsPattern(
            createWarningsLink("<a href=\"test/fixed\">.*2 fixed warnings.*</a>"));
    assertThat(actualSummary).contains(
            "Quality gate: <img src=\"color\" class=\"icon-blue\" alt=\"Success\" title=\"Success\"> Success\n");
    assertThat(actualSummary).contains("Reference build: <a href=\"absoluteUrl\">Job #15</a>");
}