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: add_command.rs
    path of file: ./repos/cargo-changelog/tests
    
    the code of the file until where you have to start completion: use std::io::Write;

mod common;

#[test]
fn add_command_creates_toml_file() {
    let temp_dir = tempfile::Builder::new()
        .prefix("cargo-changelog")
        .tempdir()
        .unwrap();
    self::common::init_git(temp_dir.path());
    self::common::init_cargo_changelog(temp_dir.path());

    self::common::cargo_changelog_add(temp_dir.path())
        .args([
            "--format=toml",
            "--set",
            "issue=123",
            "--set",
            "subject=This is some text",
            "--set",
            "type=Bugfix",
        ])
        .assert()
        .success();

    let unreleased_dir = temp_dir.path().join(".changelogs").join("unreleased");
    if !unreleased_dir.ex
    
fn add_command_creates_toml_header() {
    let temp_dir = tempfile::Builder::new()
        .prefix("cargo-changelog")
        .tempdir()
        .unwrap();
    self::common::init_git(temp_dir.path());
    self::common::init_cargo_changelog(temp_dir.path());

    self::common::cargo_changelog_add(temp_dir.path())
        .args([
            "--format=toml",
            "--set",
            "issue=123",
            "--set",
            "subject='This is some text'",
            "--set",
            "type=Bugfix",
        ])
        .assert()
        .success();

    let unreleased_dir = temp_dir.path().join(".changelogs").join("unreleased");

    let new_fragment_file = std::fs::read_dir(unreleased_dir)
        .unwrap()
        .find(|rde| match rde {
            Ok(de) => !de.path().ends_with(".gitkeep"),
            Err(_) => true,
        })
        .unwrap()
        .unwrap();

    let new_fragment_file_contents = std::fs::read_to_string(new_fragment_file.path()).unwrap();
    let toml_header = new_fragment_file_contents
        .lines()
        .skip(1)
        .take_while(|line| *line != "+++")
        .collect::<Vec<_>>()
        .join("\n");

    let toml = toml::from_str::<toml::Value>(&toml_header);
    assert!(
        toml.is_ok(),
        "Failed to parse fragment file: {:?}",
        toml.unwrap_err()
    );
}