@Operation(summary = "Get all certificates")
    @GetMapping(value = "", produces = "application/json")
    @ResponseBody
    public Page<Certificate> getAll(@RequestParam(name = "page", defaultValue = "0") int pageIndex,
                                    @RequestParam(name = "size", defaultValue = "30") int pageSize) {
        return certificateService.getAllCertificates(pageIndex, pageSize);
    }
@Test
    public void getAllCertificates() {
        when(certificateServiceMock.getAllCertificates(anyInt(), anyInt())).thenReturn(getPageCertificates());

        Page<Certificate> result = controllerMock.getAll(anyInt(), anyInt());

        verify(certificateServiceMock, times(1)).getAllCertificates(anyInt(), anyInt());
        assertNotNull(result);
        assertEquals(1, result.getTotalPages());
        assertEquals(2, result.getContent().size());
    }