How to use mockall with a trait that is serialized with erased_serde and typetag?

I have a struct that I need to serialize in a Box<dyn ...>. I use typetag to derive the serialization.
But I also need to mock this trait for some of my unit tests. When I try to use the mock! macro or the the [automock] annotation, it get the following error when compiling the tests:

 the trait `_::_serde::Serialize` is not implemented for `MockMyStruct`, which is required by `MockMyStruct: typetag::Serialize`

Does anyone have an Idea how I can solve this?

Full example:

use serde::{Deserialize, Serialize};

#[derive(Deserialize, Serialize)]
struct MyStruct {}

#[typetag::serde(tag = "type")]
trait MyTrait {
    fn do_something(&self) -> i32;

impl MyTrait for MyStruct {
    fn do_something(&self) -> i32 {

fn main() {
    let ser_test: Box<dyn MyTrait> = Box::new(MyStruct {});

    let val = ser_test.do_something();

mod tests {
    use mockall::mock;

    use super::*;

    mock! {
        pub MyStruct {}
        impl MyTrait for MyStruct {
            fn do_something(&self) -> i32;

    fn test_case() {
        let mut test_mock = MockMyStruct::new();
        test_mock.expect_foo().returning(|| { 84 }).once();
        let test: Box<dyn MyTrait> = Box::new(test_mock);
        assert_eq!(84, test.do_something());