class RestUtil {
    public static HttpHeaders processHeader(HttpHeaders httpHeaders, Map<String, String> headerMap) {
        if (MapUtils.isNotEmpty(headerMap)) {
            for (Map.Entry<String, String> entry : headerMap.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();
                httpHeaders.add(key, value);
            }
        }

        return httpHeaders;
    }

    public static String processParameter(String url, Map<String, String> parameterMap) {<FILL_FUNCTION_BODY>}

    public static HttpHeaders processCookie(HttpHeaders httpHeaders, Map<String, String> cookieMap) {
        if (MapUtils.isNotEmpty(cookieMap)) {
            List<String> cookieList = new ArrayList<String>();
            for (Map.Entry<String, String> entry : cookieMap.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();

                cookieList.add(key + DiscoveryConstant.EQUALS + value);
            }

            httpHeaders.put(DiscoveryConstant.COOKIE_TYPE, cookieList);
        }

        return httpHeaders;
    }

    public static <T> T fromJson(RestTemplate restTemplate, String result, TypeReference<T> typeReference) {
        try {
            return JsonUtil.fromJson(result, typeReference);
        } catch (Exception e) {
            String error = getError(restTemplate);
            if (StringUtils.isNotEmpty(error)) {
                throw new IllegalArgumentException(error);
            }

            throw e;
        }
    }

    public static String getError(RestTemplate restTemplate) {
        ResponseErrorHandler responseErrorHandler = restTemplate.getErrorHandler();
        if (responseErrorHandler instanceof DiscoveryResponseErrorHandler) {
            DiscoveryResponseErrorHandler discoveryResponseErrorHandler = (DiscoveryResponseErrorHandler) responseErrorHandler;

            return discoveryResponseErrorHandler.getError();
        }

        return null;
    }
}

        if (MapUtils.isNotEmpty(parameterMap)) {
            StringBuilder parameterStringBuilder = new StringBuilder();

            int index = 0;
            for (Map.Entry<String, String> entry : parameterMap.entrySet()) {
                String key = entry.getKey();
                String value = entry.getValue();

                parameterStringBuilder.append(key + DiscoveryConstant.EQUALS + value);
                if (index < parameterMap.size() - 1) {
                    parameterStringBuilder.append("&");
                }

                index++;
            }

            String parameter = parameterStringBuilder.toString();
            parameter = StringUtils.isNotEmpty(parameter) ? "?" + parameter : "";

            url += parameter;
        }

        return url;
    
<no_super_class>