Added tests for API module.