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: ttl_properties.rs
    path of file: ./repos/tikv/components/engine_rocks/src
    
    the code of the file until where you have to start completion: // Copyright 2021 TiKV Project Authors. Licensed under Apache-2.0.

use std::{collections::HashMap, marker::PhantomData};

use api_version::{KeyMode, KvFormat, RawValue};
use engine_traits::{Range, Result, TtlProperties, Ttl
    
    fn test_ttl_properties_codec() {
        let cases: Vec<(Option<u64>, Option<u64>, Vec<(&[u8], u64)>)> = vec![
            (
                Some(0),                                                      // min_expire_ts
                Some(1),                                                      // max_expire_ts
                vec![(b"tikv.min_expire_ts", 0), (b"tikv.max_expire_ts", 1)], // UserProperties
            ),
            (None, None, vec![]),
            (Some(0), None, vec![(b"tikv.min_expire_ts", 0)]),
            (None, Some(0), vec![(b"tikv.max_expire_ts", 0)]),
        ];

        for (i, (min_expire_ts, max_expire_ts, expect_user_props)) in cases.into_iter().enumerate()
        {
            let ttl_props = TtlProperties {
                min_expire_ts,
                max_expire_ts,
            };
            let user_props = RocksTtlProperties::encode(&ttl_props);
            let expect_user_props = UserProperties(
                expect_user_props
                    .into_iter()
                    .map(|(name, value)| (name.to_vec(), value.to_be_bytes().to_vec()))
                    .collect::<HashMap<_, _>>(),
            );
            assert_eq!(user_props.0, expect_user_props.0, "case {}", i);

            let decoded = RocksTtlProperties::decode(&user_props);
            assert_eq!(decoded.max_expire_ts, ttl_props.max_expire_ts, "case {}", i);
            assert_eq!(decoded.min_expire_ts, ttl_props.min_expire_ts, "case {}", i);
        }
    }