Added tests for the API