///! Test mock implementing `Send` use mockers::Scenario; use mockers_derive::mocked; #[mocked(derive(Send), debug)] trait A { fn foo(&self); } #[test] fn test_sync() { let scenario = Scenario::new(); let (mock, handle) = scenario.create_mock_for::(); scenario.expect(handle.foo().and_return(())); std::thread::spawn(move || { mock.foo() }).join().unwrap(); }