public static String replaceEndPoint(String url,String endPoint){
  return endPoint + url.replaceFirst(DEFAULT_ENDPOINT,"");
}

public static String replaceEndPoint ( String url , String endPoint ) { return endPoint + url . replaceFirst ( DEFAULT_ENDPOINT , "" ) ; }
replace the url end point ( schema + host + port ) with the given end point .
