public Page<Certificate> searchAll(CertSearchRequest request, int pageIndex, int pageSize) {
        return certificateRepository.searchAll(request, PageRequest.of(pageIndex, pageSize));
    }
@Test
    public void searchAll()  {
        CertSearchRequest csr = new CertSearchRequest();
        when(certificateRepositoryMock.searchAll(csr, PageRequest.of(1, 10))).thenReturn(getPageCertificates());

        Page<Certificate> result = certificateServiceMock.searchAll(csr, 1, 10);

        assertNotNull(result);
    }