Moved testing code to mock the API to a seapparate file.