@Test public void testURLShorten() { URLShorten urlShorten = new URLShorten(); String shortId = urlShorten.shorten("https: assertEquals("100000", shortId); String sourceUrl = urlShorten.restore(shortId); assertEquals("https: shortId = urlShorten.shorten("https: assertEquals("100001", shortId); }
public URLShorten() { this.client.set(ID_COUNTER, String.valueOf((long) Math.pow(36, 5) - 1)); }
URLShorten { public URLShorten() { this.client.set(ID_COUNTER, String.valueOf((long) Math.pow(36, 5) - 1)); } }
URLShorten { public URLShorten() { this.client.set(ID_COUNTER, String.valueOf((long) Math.pow(36, 5) - 1)); } URLShorten(); }
URLShorten { public URLShorten() { this.client.set(ID_COUNTER, String.valueOf((long) Math.pow(36, 5) - 1)); } URLShorten(); String shorten(String sourceUrl); String restore(String shortId); }
URLShorten { public URLShorten() { this.client.set(ID_COUNTER, String.valueOf((long) Math.pow(36, 5) - 1)); } URLShorten(); String shorten(String sourceUrl); String restore(String shortId);  }