public void BeginWriteThrows() { var stream = new HttpRequestStream(Mock.Of <IHttpBodyControlFeature>()); Assert.Throws <NotSupportedException>(() => stream.BeginWrite(new byte[1], 0, 1, null, null)); }