@Test
public void searchProjectsForUserPaginatedSearchesInAllProjectsWhenUserIsManager() {

    // given
    var expectedQuery = "a cool query";
    var expectedPageable = PageRequest.of(1, 4);
    given(userServiceMock.userIsManager(userMock)).willReturn(true);
    given(managerHibernateSearchServiceMock.searchProjects(expectedQuery, expectedPageable, null))
            .willReturn(new PageImpl<>(List.of(projectMock)));
    // when
    var actualProjectPage = userProjectService.searchProjectsForUserPaginated(expectedQuery, userMock, expectedPageable);
    // then
    assertThat(actualProjectPage).containsExactly(projectMock);
}