public List<IssueDto> sort() {
    String sort = query.sort();
    Boolean asc = query.asc();
    if (sort != null && asc != null) {
      return getIssueProcessor(sort).sort(issues, asc);
    }
    return issues;
  }
@Test
  public void should_sort_by_desc_severity() {
    IssueDto issue1 = new IssueDto().setKee("A").setSeverity("INFO");
    IssueDto issue2 = new IssueDto().setKee("B").setSeverity("BLOCKER");
    IssueDto issue3 = new IssueDto().setKee("C").setSeverity("MAJOR");
    List<IssueDto> dtoList = newArrayList(issue1, issue2, issue3);

    IssueQuery query = IssueQuery.builder().sort(IssueQuery.SORT_BY_SEVERITY).asc(false).build();
    IssuesFinderSort issuesFinderSort = new IssuesFinderSort(dtoList, query);

    List<IssueDto> result = newArrayList(issuesFinderSort.sort());

    assertThat(result).hasSize(3);
    assertThat(result.get(0).getSeverity()).isEqualTo("BLOCKER");
    assertThat(result.get(1).getSeverity()).isEqualTo("MAJOR");
    assertThat(result.get(2).getSeverity()).isEqualTo("INFO");
  }