public Page<Connection> findAll(int pageIndex, int pageSize) {
        return connectionRepository.findAll(PageRequest.of(pageIndex, pageSize));
    }
@Test
    void pageWithAllConnections() {
        when(connectionRepositoryMock.findAll(PageRequest.of(1, 10))).thenReturn(getPageConnections());

        Page<Connection> result = connectionServiceMock.findAll(1, 10);

        verify(connectionRepositoryMock, times(1)).findAll(PageRequest.of(1, 10));
        assertNotNull(result);
        assertEquals(1, result.getTotalPages());
        assertEquals(2, result.getContent().size());
    }