add test for api