Refactored out the creation of the test ESIContext to a test only class, allowing for the real context to be passed in when integrated into the esi:when.