Refactor CommandMatchTest