add tests for test in cli/api