public void NotificationWriterDisposeShouldBeIdempotent(bool synchronous, string expected)
        {
            var notificationWriter = new ODataNotificationWriter(
                this.writer,
                this.streamListener,
                synchronous);

            // 1st call to Dispose
            notificationWriter.Dispose();
            // 2nd call to Dispose
            notificationWriter.Dispose();

            var result = ReadStreamContents();

            // StreamDisposed/StreamDisposeAsync was written only once
            Assert.Equal(expected, result);
        }