Adding more tests for api endpoints