Move xhr_mocking into test case.