class Util {

    public static String encodeUrl(String toBeEncoded) {
        String encoded = toBeEncoded;
        try {
            encoded = URLEncoder.encode(toBeEncoded, "UTF-8");
        } catch (UnsupportedEncodingException e) {
            LOGGER.error("Error in encodeUrl ", e);
        }
        return encoded;
    }

}