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: addr_test.rs
    path of file: ./repos/webrtc/stun/src/addr
    
    the code of the file until where you have to start completion: use super::*;
use crate::error::*;

#[test]
fn test_mapped_address() -> Result<()> {
    let mut m = Message::new();
    let addr = MappedAddress {
        ip: "122.12.34.5".parse().unwrap(),
        port: 5412,
    };
    assert_eq!(addr.to_string(), "122.12.34.5:5412", "bad string {addr}");

    //"add_to"
    {
        addr.add_to(&mut m)?;

        //"GetFrom"
        {
            let mut got = MappedAddress::default();
            go
    
fn test_mapped_address_v6() -> Result<()> {
    let mut m = Message::new();
    let addr = MappedAddress {
        ip: "::".parse().unwrap(),
        port: 5412,
    };

    //"add_to"
    {
        addr.add_to(&mut m)?;

        //"GetFrom"
        {
            let mut got = MappedAddress::default();
            got.get_from(&m)?;
            assert_eq!(got.ip, addr.ip, "got bad IP: {}", got.ip);

            //"Not found"
            {
                let message = Message::new();
                let result = got.get_from(&message);
                if let Err(err) = result {
                    assert_eq!(
                        Error::ErrAttributeNotFound,
                        err,
                        "<{}> should be <{}>",
                        err,
                        Error::ErrAttributeNotFound,
                    );
                } else {
                    panic!("expected error, but got ok");
                }
            }
        }
    }
    Ok(())
}