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: encode.rs
    path of file: ./repos/sway/forc-plugins/forc-client/src/util
    
    the code of the file until where you have to start completion: use anyhow::Context;
use fuel_abi_types::abi::full_program::FullTypeApplication;
use std::str::FromStr;
use sway_types::u256::U256;

/// A wrapper around fuels_core::types::Token, which enables serde de/serialization.
#[derive(Debug, PartialEq, serde::Serialize, serde::Deserialize)]
pub(crate) struct Token(pub(crate) fuels_core::types::Token);

#[derive(Debug, PartialEq, Eq)]
pub(crate) enum Type {
    Unit,
    U8,
    U16,
    U32,
    U64,
    U256,
    Bool,
}

impl TryFrom<&FullTypeApplication> for Type {
    type Error = anyhow::Error;

    fn
    
    fn test_token_generation_success() {
        let u8_token = Token::from_type_and_value(&Type::U8, "1").unwrap();
        let u16_token = Token::from_type_and_value(&Type::U16, "1").unwrap();
        let u32_token = Token::from_type_and_value(&Type::U32, "1").unwrap();
        let u64_token = Token::from_type_and_value(&Type::U64, "1").unwrap();
        let bool_token = Token::from_type_and_value(&Type::Bool, "true").unwrap();

        let generated_tokens = [u8_token, u16_token, u32_token, u64_token, bool_token];
        let expected_tokens = [
            Token(fuels_core::types::Token::U8(1)),
            Token(fuels_core::types::Token::U16(1)),
            Token(fuels_core::types::Token::U32(1)),
            Token(fuels_core::types::Token::U64(1)),
            Token(fuels_core::types::Token::Bool(true)),
        ];

        assert_eq!(generated_tokens, expected_tokens)
    }