DRY on fakeXHR