@Test
public void getOpenMergeRequestsSortByIssuedTest() {

    try (RepositoryConnection conn = repo.getConnection()) {
        MergeRequestFilterParams.Builder builder = new MergeRequestFilterParams.Builder().setSortBy(VALUE_FACTORY.createIRI(_Thing.issued_IRI));
        List<MergeRequest> result = manager.getMergeRequests(builder.build(), conn);
        assertEquals(2, result.size());
        Iterator<MergeRequest> it = result.iterator();
        assertEquals(request2.getResource(), it.next().getResource());
        assertEquals(request1.getResource(), it.next().getResource());
        verify(utilsService).getExpectedObject(eq(request1.getResource()), eq(mergeRequestFactory), any(RepositoryConnection.class));
        verify(utilsService).getExpectedObject(eq(request2.getResource()), eq(mergeRequestFactory), any(RepositoryConnection.class));
        builder.setAscending(true);
        result = manager.getMergeRequests(builder.build(), conn);
        assertEquals(2, result.size());
        it = result.iterator();
        assertEquals(request1.getResource(), it.next().getResource());
        assertEquals(request2.getResource(), it.next().getResource());
    }
}