Refactoring CommandHandlerTest