@Override
  public int compareTo(AlluxioURI other) {
    return mUri.compareTo(other.mUri);
  }
@Test
  public void compareToTests() {
    AlluxioURI[] uris =
        new AlluxioURI[] {new AlluxioURI("file://127.0.0.0:8081/a/b/c.txt"),
            new AlluxioURI("glusterfs://127.0.0.0:8081/a/b/c.txt"),
            new AlluxioURI("hdfs://127.0.0.0:8081/a/b/c.txt"),
            new AlluxioURI("hdfs://127.0.0.1:8081/a/b/c.txt"),
            new AlluxioURI("hdfs://127.0.0.1:8081/a/b/d.txt"),
            new AlluxioURI("hdfs://127.0.0.1:8081/a/c/c.txt"),
            new AlluxioURI("hdfs://127.0.0.1:8082/a/c/c.txt"),
            new AlluxioURI("hdfs://localhost:8080/a/b/c.txt"),
            new AlluxioURI("s3://localhost:8080/a/b/c.txt"),
            new AlluxioURI("scheme://localhost:8080/a.txt"),
            new AlluxioURI("scheme://localhost:8080/a.txt?a=a"),
            new AlluxioURI("scheme://localhost:8080/a.txt?b=b"),
            new AlluxioURI("scheme://localhost:8080/a.txt?c=c"),
            new AlluxioURI("scheme:scheme://localhost:8080/a.txt"),
            new AlluxioURI("scheme:scheme://localhost:8080/b.txt"),
            new AlluxioURI("scheme:schemeB://localhost:8080/a.txt"),
            new AlluxioURI("scheme:schemeB://localhost:8080/b.txt"),
            new AlluxioURI("schemeA:scheme://localhost:8080/a.txt"),
            new AlluxioURI("schemeA:scheme://localhost:8080/b.txt"),
            new AlluxioURI("schemeA:schemeB:schemeC://localhost:8080/a.txt"),
            new AlluxioURI("schemeA:schemeB:schemeC://localhost:8080/b.txt"),
            new AlluxioURI("schemeA:schemeB:schemeD://localhost:8080/a.txt"),
            new AlluxioURI("schemeA:schemeB:schemeD://localhost:8080/b.txt"),
            new AlluxioURI("schemeE:schemeB:schemeB://localhost:8080/a.txt"),
            new AlluxioURI("schemeE:schemeB:schemeB://localhost:8080/b.txt"),
        };

    for (int i = 0; i < uris.length - 1; i++) {
      assertTrue(uris[i].compareTo(uris[i + 1]) < 0);
      assertTrue(uris[i + 1].compareTo(uris[i]) > 0);
      assertEquals(0, uris[i].compareTo(uris[i]));
    }
  }