unittest for cmdutil