public SearchResults<ProjectBindingInformation> findProjectBindingsByRequest(ProjectBindingsSearchRequest request) {
    ProjectAlmSettingQuery query = buildProjectAlmSettingQuery(request);
    try (DbSession session = dbClient.openSession(false)) {
      int total = dbClient.projectAlmSettingDao().countProjectAlmSettings(session, query);
      if (request.pageSize() == 0) {
        return new SearchResults<>(List.of(), total);
      }
      List<ProjectBindingInformation> searchResults = performSearch(session, query, request.page(), request.pageSize());
      return new SearchResults<>(searchResults, total);
    }
  }
@Test
  void findProjectBindingsByRequest_whenPageSize0_returnsOnlyTotal() {
    when(dbClient.projectAlmSettingDao().countProjectAlmSettings(eq(dbSession), any()))
      .thenReturn(12);

    ProjectBindingsSearchRequest request = new ProjectBindingsSearchRequest(null, null, 42, 0);
    SearchResults<ProjectBindingInformation> actualResults = underTest.findProjectBindingsByRequest(request);

    assertThat(actualResults.total()).isEqualTo(12);
    assertThat(actualResults.searchResults()).isEmpty();

    verify(dbClient.projectAlmSettingDao(), never()).selectProjectAlmSettings(eq(dbSession), any(), anyInt(), anyInt());
  }