XHR request interceptor for tests. Application and test framework agnostic.