@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (!(o instanceof AlluxioURI)) {
      return false;
    }
    AlluxioURI that = (AlluxioURI) o;
    return mUri.equals(that.mUri);
  }
@Test
  public void queryEquals() {
    Map<String, String> queryMap = new HashMap<>();
    queryMap.put("a", "b");
    queryMap.put("c", "d");

    assertTrue(new AlluxioURI("scheme://host:123/a.txt?a=b&c=d")
        .equals(new AlluxioURI("scheme://host:123/a.txt?a=b&c=d")));
    // There is no guarantee which order the queryMap will create the query string.
    assertTrue(new AlluxioURI("scheme://host:123/a.txt?c=d&a=b")
        .equals(new AlluxioURI("scheme", Authority.fromString("host:123"), "/a.txt", queryMap))
        || new AlluxioURI("scheme://host:123/a.txt?a=b&c=d")
        .equals(new AlluxioURI("scheme", Authority.fromString("host:123"), "/a.txt", queryMap)));

    assertFalse(new AlluxioURI("scheme://host:123/a.txt?a=b&c=d&e=f")
        .equals(new AlluxioURI("scheme://host:123/a.txt?a=b&c=d")));
    assertFalse(new AlluxioURI("scheme://host:123/a.txt?a=b&c=d&e=f")
        .equals(new AlluxioURI("scheme", Authority.fromString("host:123"), "/a.txt", queryMap)));
  }