Test code for API's