add unit tests for CLI tool