void longUri(String uri) { String relonged = CompressedURIHandler.longURI(CompressedURIHandler.shortURI(URIs.of(uri))).toString(); equals(uri, relonged); System.out.println( uri.length() + "v." + CompressedURIHandler.shortURI(URIs.of(uri)).toString().length()); }
@Test public void shortUriNotEndingWithSlash() { String uri = CompressedURIHandler.shortURI(URIs.of("/foo/bar")).toString(); assertFalse(uri.endsWith("/")); assertTrue(uri.startsWith("/z/")); }