code: public static String concatenatePath(String path, String endpoint) {
  		String firstSegment = ensureAbsolutePath(path);
  		if (endpoint == null || endpoint.isEmpty()) {
  			return firstSegment;
  		}
  
  		StringBuilder sb = new StringBuilder(firstSegment);
  		if (path.charAt(path.length() - 1) != PATH_SEPARATOR) {
  			sb.append(PATH_SEPARATOR);
  		}
  
  		if (endpoint.charAt(0) == PATH_SEPARATOR) {
  			sb.append(endpoint.substring(1));
  		}
  		else {
  			sb.append(endpoint);
  		}
  
  		return sb.toString();
  	}
docs: Concatenate two path value.
  
  @param path Path prefix.
  @param endpoint Path suffix.
  @return Final path.