Wrote unit tests for API class