added tests for api calls