@Operation(summary = "Get paginated list of connections")
    @GetMapping(value = "", produces = "application/json")
    @ResponseBody
    public Page<ConnectionResponse> getAll( @RequestParam(name = "page", defaultValue = "0") int pageIndex,
                                            @RequestParam(name = "size", defaultValue = "30") int pageSize) {
        Page<Connection> allConnections = connectionService.findAll(pageIndex, pageSize);
        return connectionService.convertToConnectionResponse(allConnections);
    }
@Test
    public void getAllConnections() {
        when(connectionServiceMock.findAll(anyInt(), anyInt())).thenReturn(getPageConnections());
        when(connectionServiceMock.convertToConnectionResponse(any(Page.class))).thenReturn(getPageConnectionResponse());

        Page<ConnectionResponse> result = controllerMock.getAll(1, 10);

        verify(connectionServiceMock, times(1)).findAll(anyInt(), anyInt());
        verify(connectionServiceMock, times(1)).convertToConnectionResponse(any(Page.class));
        assertNotNull(result);
        assertEquals(1, result.getTotalPages());
        assertEquals(1, result.getContent().size());
    }