protected function getMessageFromEvent(ResourceEventInterface $event)
    {
        $message = $event->getResource();

        if (!$message instanceof TicketMessageInterface) {
            throw new UnexpectedValueException("Expected instance of " . TicketMessageInterface::class);
        }

        return $message;
    }