public function testFailedCommandHandlerResolution()
 {
     $command = m::mock('Tectonic\\Application\\Commanding\\Command');
     $translator = new CommandTranslator();
     $this->setExpectedException('Tectonic\\Application\\Commanding\\CommandHandlerNotFoundException');
     $translator->getCommandHandler($command);
 }
 /**
  * Execute the required command against the command handler.
  *
  * @param Command $command
  * @return mixed
  */
 public function execute(Command $command)
 {
     $handler = $this->commandTranslator->getCommandHandler($command);
     $commandName = $this->getCommandName($command);
     $this->log->info("New command [{$commandName}]", get_object_vars($command));
     return $this->app->make($handler)->handle($command);
 }