protected function getCommandHandler(CommandMessageInterface $commandMessage): CommandHandlerInterface
    {
        $name = $commandMessage->getPayloadType()->getName();
        $commandHandlers = $this->getCommandHandlers();
        if (array_key_exists($name, $commandHandlers) === false) {
            throw new CommandHandlerNotFound($commandMessage);
        }

        return $commandHandlers[$name];
    }