protected function getAttachmentFromEvent(ResourceEventInterface $event)
    {
        $attachment = $event->getResource();

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

        return $attachment;
    }