Added tests for API response processing