You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: datagram.rs
    path of file: ./repos/neqo/neqo-transport/src/connection/tests
    
    the code of the file until where you have to start completion: // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::{cell::RefCell, rc::Rc};

use neqo_common::event::Provider;
use test_fixture::now;

use super::{
    assert_error, connect_force_idle, default_client, default_server, new_client, new_server,
    AT_LEAST_PTO,
};
use crate::{
    events::{ConnectionEvent, OutgoingDatagramOutcome},
    frame::FRAME_TYPE_DATAGRAM,
    packet::PacketBuilder,
    quic_datagrams::MAX_QUIC_DATAGRAM,
    send_stream::{RetransmissionPriority, TransmissionPriority},
    Connection, ConnectionError, ConnectionParameters, Error, StreamType,
};

const DATAGRAM_LEN_MTU: u64 = 1310;
co
    
fn outgoing_datagram_queue_full() {
    let (mut client, mut server) = connect_datagram();

    let dgram_sent = client.stats().frame_tx.datagram;
    assert_eq!(client.send_datagram(DATA_SMALLER_THAN_MTU, Some(1)), Ok(()));
    assert_eq!(
        client.send_datagram(DATA_SMALLER_THAN_MTU_2, Some(2)),
        Ok(())
    );

    // The outgoing datagram queue limit is 2, therefore the datagram with id 1
    // will be dropped after adding one more datagram.
    let dgram_dropped = client.stats().datagram_tx.dropped_queue_full;
    assert_eq!(client.send_datagram(DATA_MTU, Some(3)), Ok(()));
    assert!(matches!(
        client.next_event().unwrap(),
        ConnectionEvent::OutgoingDatagramOutcome { id, outcome } if id == 1 && outcome == OutgoingDatagramOutcome::DroppedQueueFull
    ));
    assert_eq!(
        client.stats().datagram_tx.dropped_queue_full,
        dgram_dropped + 1
    );

    // Send DATA_SMALLER_THAN_MTU_2 datagram
    let out = client.process_output(now()).dgram();
    assert_eq!(client.stats().frame_tx.datagram, dgram_sent + 1);
    server.process_input(&out.unwrap(), now());
    assert!(matches!(
        server.next_event().unwrap(),
        ConnectionEvent::Datagram(data) if data == DATA_SMALLER_THAN_MTU_2
    ));

    // Send DATA_SMALLER_THAN_MTU_2 datagram
    let dgram_sent2 = client.stats().frame_tx.datagram;
    let out = client.process_output(now()).dgram();
    assert_eq!(client.stats().frame_tx.datagram, dgram_sent2 + 1);
    server.process_input(&out.unwrap(), now());
    assert!(matches!(
        server.next_event().unwrap(),
        ConnectionEvent::Datagram(data) if data == DATA_MTU
    ));
}