で囲む必要がある mock! { pub HttpClient { pub(crate) async fn get_access_token(&self, body: String) -> anyhow::Result<String>; pub(crate) async fn get_folder_items(&self, url: &String, access_token: &String) -> anyhow::Result<String>; pub(crate) async fn post_sms_request(&self, body: String) -> anyhow::Result<String>; pub(crate) async fn download_file(&self, url: &String, access_token: &String) -> anyhow::Result<Vec<u8>>; } impl Clone for HttpClient { fn clone(&self) -> Self; } } なぜかtest 環境だけでderive(Dummy) を有効にしていると、tokio::test ではfake を作成できなかった