Command tests refactored