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