Added tests for search command and fixed typo