private static function getClassByType($type)
    {
        if (!isset(self::$types[$type])) {
            throw new UnknownMessageException(
                'Unable to parse message because type ('.$type.')'
                .' is not mapped.'
            );
        }

        return self::$types[$type];
    }