added testcase for api.