Add tests for CLI