@Operation(summary = "Get collect metadata process results by connection id")
    @GetMapping(value = "collect_metadata/results/{connection_id}", produces = "application/json")
    @ResponseBody
    public Page<SamlMetadataProcessResult> findAllByConnectionId(@RequestParam(name = "page") int pageIndex,
                                                                 @RequestParam(name = "size") int pageSize, @PathVariable("connection_id") Long connectionId) {
        return metadataRetrieverService.getAllSamlMetadataById(connectionId, pageIndex, pageSize);
    }
@Test
    public void findAllByConnectionId() {
        when(metadataRetrieverServiceMock.getAllSamlMetadataById(anyLong(), anyInt(), anyInt())).thenReturn(MetadataProcessHelper.getPageSamlMetadataProcessResult());

        Page<SamlMetadataProcessResult> result = controllerMock.findAllByConnectionId(1, 10, 1L);

        verify(metadataRetrieverServiceMock, times(1)).getAllSamlMetadataById(anyLong(), anyInt(), anyInt());
        assertNotNull(result);
    }