Mocking Ajax calls library