Added unit tests for CLI.