Mock the ajax calls for the unit tests.