public void RequestThenResponseHeaders_Add_Throws() { WebHeaderCollection w = new WebHeaderCollection(); w[HttpRequestHeader.Accept] = "text/json"; Assert.Throws<InvalidOperationException>(() => w[HttpResponseHeader.ContentLength] = "123"); }