jQuery Mockjax plugin provides request/response mocking for ajax requests using the jQuery API and provides all standard behaviors in the request/response flow.
Website Demo