The HttpContextBase class is an abstract class that contains the same members as the HttpContext class. The HttpContextBase class enables you to create derived classes that are like the HttpContext class, but that you can customize and that work outside the ASP.NET pipeline. When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario you are testing.
The HttpContextWrapper2 class derives from the HttpContextBase class. The HttpContextWrapper2 class serves as a wrapper for the HttpContext class. At run time, you typically use an instance of the HttpContextWrapper2 class to call members on the HttpContext object.