Added tests for most API methods