class UrlUtil {
    public static String formatUrl(String url) {
        if (!url.endsWith("/")) {
            url = url + "/";
        }

        return url;
    }

    public static String formatContextPath(String contextPath) {<FILL_FUNCTION_BODY>}
}

        if (StringUtils.isEmpty(contextPath)) {
            return "/";
        } else {
            if (!contextPath.startsWith("/")) {
                contextPath = "/" + contextPath;
            }
            if (!contextPath.endsWith("/")) {
                contextPath = contextPath + "/";
            }
        }

        return contextPath;
    
<no_super_class>