Add tests for API class