  @Test
  public void testToRelativeUrlWithEmptyPath() {

    Uri uri = new Uri("http", "user", "example.com", 44, null, "query=4", null);
    String relativeUrl = uri.toRelativeUrl();
    assertEquals(relativeUrl, "/?query=4", "toRelativeUrl returned incorrect url");
  }