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