added test cases for API