@SuppressWarnings("unchecked")
@Test
void shouldReturnIssueDetailFiltered() {

    DetailFactory detailFactory = new DetailFactory();
    AnalysisResult result = mock(AnalysisResult.class);
    Object details = detailFactory.createTrendDetails("category." + "CATEGORY2".hashCode(), RUN, result, ALL_ISSUES,
            NEW_ISSUES, OUTSTANDING_ISSUES, FIXED_ISSUES, ENCODING, createParent());
    assertThat(details).isInstanceOf(IssuesDetail.class);
    Report filtered = ((IssuesDetail) details).getIssues();
    assertThat(filtered).hasSize(1);
    assertThat(filtered.get(0)).hasCategory("CATEGORY2").hasSeverity(Severity.WARNING_HIGH);
}