Refine CLI tests