@Operation(summary = "update the connection")
    @PatchMapping(value = "{id}", consumes = "application/json")
    public Connection update(@PathVariable("id") Long id, @RequestBody ConnectionDTO connectionDTO) {
        Connection connectionUpdated = connectionService.updateAttributes(id, connectionDTO);
        metadataProcessorService.startCollectMetadata(connectionUpdated, new HashMap<>());
        connectionService.updateConnection(connectionUpdated);
        return connectionUpdated;
    }
@Test
    public void updateConnection() {
        when(connectionServiceMock.updateAttributes(anyLong(), any(ConnectionDTO.class))).thenReturn(getNewConnection());

        Connection result = controllerMock.update(1L, getNewConnectionDTO());

        verify(connectionServiceMock, times(1)).updateAttributes(anyLong(), any(ConnectionDTO.class));
        verify(metadataProcessorServiceMock, times(1)).startCollectMetadata(any(Connection.class), anyMap());
        verify(connectionServiceMock, times(1)).updateConnection(any(Connection.class));
        assertNotNull(result);
    }