@Test
public void getApplicationsOfUser() {

    // given
    var sort = Sort.unsorted();
    var firstApplicationMock = mock(ProjectApplication.class);
    var secondApplicationMock = mock(ProjectApplication.class);
    var expectedApplications = List.of(firstApplicationMock, secondApplicationMock);
    given(applicationRepoMock.findAllByUser(userMock, sort)).willReturn(expectedApplications);
    // when
    var actualApplications = applicationService.getApplicationsOfUser(userMock, sort);
    // then
    assertThat(actualApplications).containsExactlyInAnyOrder(firstApplicationMock, secondApplicationMock);
}