public static String getPath(String basePath, String... parts) {
    StringJoiner stringJoiner = new StringJoiner(File.separator);
    stringJoiner.add(basePath);
    for (String part : parts) {
      stringJoiner.add(part);
    }
    return stringJoiner.toString();
  }
@Test
  public void testGetPath() {
    assertEquals(URIUtils.getPath("http://foo/bar"), "http://foo/bar");
    assertEquals(URIUtils.getPath("http://foo/bar", "table"), "http://foo/bar/table");
    assertEquals(URIUtils.getPath("http://foo/bar", "table", "segment+%25"), "http://foo/bar/table/segment+%25");
    assertEquals(URIUtils.getPath("/foo/bar", "table", "segment+%25"), "/foo/bar/table/segment+%25");
    assertEquals(URIUtils.getPath("file:/foo/bar", "table", "segment+%25"), "file:/foo/bar/table/segment+%25");
  }