public async Task AddIncomingMiddleware_AppliedToIncomingMessages() { _sut.AddIncomingMiddleware(ms => ms.Select(m => { m.Text += "++"; return(m); })); await Connect(); var observer = ObserveIncomingMessages(); _incomingMessages.OnNext(new MessageEvent { Text = "foo" }); observer.Messages.Select(m => m.Value.Value.Text) .ShouldMatch(new[] { "foo++" }); }