Add test for api