Factorize globally replacing xhrClass with FakeXhr