public static String constructDownloadUrl(String baseUrl, String rawTableName, String segmentName) {
    return getPath(baseUrl, "segments", rawTableName, encode(segmentName));
  }
@Test
  public void testConstructDownloadUrl() {
    assertEquals(URIUtils.constructDownloadUrl("http://foo/bar", "table", "segment"),
        "http://foo/bar/segments/table/segment");
    assertEquals(URIUtils.constructDownloadUrl("http://foo/bar", "table", "segment %"),
        "http://foo/bar/segments/table/segment+%25");
  }