Added tests for watcher API.