### Question:
MidToWid { public static String mid2wid(String url) { String temp = ""; int start1 = url.indexOf("?"); if (start1 == -1) { int start2 = url.lastIndexOf("/"); if (start2 == -1) { temp = url; } else { temp = url.substring(start2 + 1); } } else { temp = url.substring(start1 - 9, start1); } return String.valueOf(DICT.indexOf(temp.charAt(0))) + convert62to10(temp.substring(1, 5)) + convert62to10(temp.substring(5, 9)); }  static String mid2wid(String url); static void main(String[] args); static final String DICT; }### Answer:
@Test public void testMidToWid() { String url1 = "ztkfl7xaf"; String url2 = "http: String url3 = "http: assertEquals("3569893431795783", MidToWid.mid2wid(url1)); assertEquals("3569893431795783", MidToWid.mid2wid(url2)); assertEquals("3569893431795783", MidToWid.mid2wid(url3)); }