public static HttpResponseBase CreateResponseBase()
{
var responseBase = Substitute.For<HttpResponseBase>();
var collection = new NameValueCollection();
responseBase.Headers.Returns(collection);
responseBase.When(x => x.AppendHeader(Arg.Any<string>(), Arg.Any<string>()))
.Do(args => collection.Add((string) args[0], (string) args[1]));
responseBase.Filter = new MemoryStream();
return responseBase;
}
}