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_status() {
    IssueDto issue1 = new IssueDto().setKee("A").setStatus("CLOSED");
    IssueDto issue2 = new IssueDto().setKee("B").setStatus("REOPENED");
    IssueDto issue3 = new IssueDto().setKee("C").setStatus("OPEN");
    List<IssueDto> dtoList = newArrayList(issue1, issue2, issue3);

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

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

    assertThat(result).hasSize(3);
    assertThat(result.get(0).getStatus()).isEqualTo("REOPENED");
    assertThat(result.get(1).getStatus()).isEqualTo("OPEN");
    assertThat(result.get(2).getStatus()).isEqualTo("CLOSED");
  }