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: persist.rs
    path of file: ./repos/firecracker/src/vmm/src/mmds
    
    the code of the file until where you have to start completion: // Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

//! Defines 
    
    fn test_persistence() {
        let ns = MmdsNetworkStack::new_with_defaults(None, Arc::new(Mutex::new(Mmds::default())));

        let mut mem = vec![0; 4096];

        Snapshot::serialize(&mut mem.as_mut_slice(), &ns.save()).unwrap();

        let restored_ns = MmdsNetworkStack::restore(
            Arc::new(Mutex::new(Mmds::default())),
            &Snapshot::deserialize(&mut mem.as_slice()).unwrap(),
        )
        .unwrap();

        assert_eq!(restored_ns.mac_addr, ns.mac_addr);
        assert_eq!(restored_ns.ipv4_addr, ns.ipv4_addr);
        assert_eq!(
            restored_ns.tcp_handler.local_port(),
            ns.tcp_handler.local_port()
        );
        assert_eq!(
            restored_ns.tcp_handler.max_connections(),
            ns.tcp_handler.max_connections()
        );
        assert_eq!(
            restored_ns.tcp_handler.max_pending_resets(),
            ns.tcp_handler.max_pending_resets()
        );
    }