Added tests for REST apis