@staticmethod
def append_url_with_template_parameters(url, parameters):
    """Replaces template parameters in the given url.

        Args:
            url (str): The query url string to replace the template parameters.
            parameters (dict): The parameters to replace in the url.

        Returns:
            str: Url with replaced parameters.

        """
    if url is None:
        raise ValueError('url is null')
    if parameters is None:
        return url
    for key in parameters:
        element = parameters[key]
        replace_value = ''
        if element is None:
            replace_value = ''
        elif isinstance(element, list):
            replace_value = '/'.join(element)
        else:
            replace_value = str(element)
        url = url.replace('{{{0}}}'.format(key), str(replace_value))
    return url
