@Operation(summary = "Start collecting of Metadata for one or all connections ")
    @GetMapping(value = "collect_metadata/{id}", produces = "application/json")
    public Map<String, String> collectMetadata(@PathVariable("id") String id) throws CollectSamlMetadataException {
        return metadataProcessorService.collectSamlMetadata(id);
    }
@Test
    public void collectMetadata() throws CollectSamlMetadataException {
        Map<String, String> collectMetadata = new HashMap<>();
        collectMetadata.put("count", "1");
        when(metadataProcessorServiceMock.collectSamlMetadata(anyString())).thenReturn(collectMetadata);

        Map<String, String> result = controllerMock.collectMetadata("id");

        verify(metadataProcessorServiceMock, times(1)).collectSamlMetadata(anyString());
        assertEquals(result.size(), collectMetadata.size());
        assertNotNull(result);
    }