pub fn mock_service<S, I, F>( name: &'static str, state: S, f: F, ) -> (Addr<I>, JoinHandle<S>)where S: Send + 'static, I: Interface, F: FnMut(&mut S, I) + Send + 'static,
Spawns a mock service that handles messages through a closure.
Note: Addr must be dropped before handle can be awaited.