Added unit tests for the API class