Tests for API class