Unit test - IsCommandValid()