public Connection updateAttributes(Long id, ConnectionDTO connectionDTO) {
        Connection connection = getConnectionById(id);
        return connectionMapper.toUpdatedConnection(connection, connectionDTO);
    }
@Test
    void updateAttributes() {
        Connection connectionOld = new Connection();
        connectionOld.setName("old");
        connectionOld.setStatus(new Status());

        Optional<Connection> connectionOptional = Optional.of(connectionOld);

        when(connectionRepositoryMock.findById(anyLong())).thenReturn(connectionOptional);
        Connection result = connectionServiceMock.updateAttributes(1L, newConnectionDTO());

        assertEquals(result.getName(), newConnection().getName());
        assertEquals(result.getEntityId(), newConnection().getEntityId());
        assertNotNull(result);
    }