private static <T extends ConfigInstance> ConfigSubscription<T> getRawSub(ConfigKey<T> key, ConfigSource source) {
        String payload = ((source instanceof RawSource)
                ? ((RawSource) source).payload
                : key.getConfigId().replace("raw:", ""));
        return new RawConfigSubscription<>(key, payload);
    }
Correct type of ConfigSubscription instance based on type of source or form of config id

@param key        a {@link ConfigKey}
@return a subclass of a ConfigsSubscription
config/src/main/java/com/yahoo/config/subscription/impl/ConfigSubscription.java