public function createMessage(TicketInterface $ticket = null)
    {
        /* @var TicketMessageInterface $message */
        $message = new $this->ticketMessageClass();

        if ($ticket) {
            $message->setPriority($ticket->getPriority());
            $message->setStatus($ticket->getStatus());
            $message->setTicket($ticket);
        } else {
            $message->setStatus(TicketMessage::STATUS_OPEN);
        }

        return $message;
    }