add unit test for command info
update test case name and restructure test setup.
Merge pull request #925 from lzhan/addunittest

add unit test for command info