adding tests for api