diff --git a/test/src/client_utils.dart b/test/src/client_utils.dart index cb00f34..31b7d14 100644 --- a/test/src/client_utils.dart +++ b/test/src/client_utils.dart @@ -118,7 +118,7 @@ class ClientHarness { when(transport.makeRequest(any)).thenReturn(stream); when(transport.onActiveStateChanged = captureAny).thenReturn(null); when(stream.outgoingMessages).thenReturn(fromClient.sink); - when(stream.incomingMessages).thenReturn(toClient.stream); + when(stream.incomingMessages).thenAnswer((_) => toClient.stream); client = new TestClient(channel); }