@Test public void encodeUrl() throws Exception{ String encoded = Util.encodeUrl("http: assertTrue(encoded.equals("http%3A%2F%2Fwwww.google.com")); }
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; }
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; } }
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; }  }
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; }  @Autowired(required = true) void setassetService(AssetService assetService); static boolean isValidTargetType(String ag, String type); static boolean isValidAssetGroup(String ag); static int getUtilisationScore(double cpuUtilisation); static String encodeUrl(String toBeEncoded); }
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; }  @Autowired(required = true) void setassetService(AssetService assetService); static boolean isValidTargetType(String ag, String type); static boolean isValidAssetGroup(String ag); static int getUtilisationScore(double cpuUtilisation); static String encodeUrl(String toBeEncoded);  }