functional test for api test