@Test
public void searchProjectsForUserSearchesInAllProjectsWhenUserIsManager() {

    // given
    var expectedQuery = "a cool query";
    given(userServiceMock.userIsManager(userMock)).willReturn(true);
    given(managerHibernateSearchServiceMock.searchProjects(expectedQuery, null)).willReturn(List.of(projectMock));
    // when
    var actualProjects = userProjectService.searchProjectsForUser(userMock, expectedQuery, Sort.unsorted());
    // then
    assertThat(actualProjects).containsExactly(projectMock);
}