@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 failedCollectingMetadata() throws CollectSamlMetadataException {
        when(metadataProcessorServiceMock.collectSamlMetadata(anyString())).thenThrow(CollectSamlMetadataException.class);
        assertThrows(CollectSamlMetadataException.class, () -> {
            controllerMock.collectMetadata(anyString());
        });
    }