Complete adding testcases for api methods.