private function getEventDefinition(string $serialized): array
    {
        $definition = $this->getDeserializationDefinition($serialized);

        if (!isset($definition['class'], $definition['payload'], $definition['attributes'])
            || \count(\array_diff(\array_keys($definition), ['class', 'payload', 'attributes'])) !== 0
            || !\is_string($definition['class'])
            || !\is_array($definition['payload'])
            || !\is_array($definition['attributes'])
        ) {
            throw new EventSerializationException('Malformed JSON serialized event');
        }

        return $definition;
    }