Base62Util { public static String fromBase10(final long base10) { if (base10 == 0) { return "0"; } long temp = base10; final StringBuilder sb = new StringBuilder(); while (temp > 0) { temp = fromBase10(temp, sb); } return sb.reverse().toString(); } private  Base62Util(); static String fromBase10(final long base10); static Long toBase10(final String base62);  }
@Test @Description("Convert Base10 numbres to Base62 ASCII strings.") public void fromBase10() { assertThat(Base62Util.fromBase10(0L)).isEqualTo("0"); assertThat(Base62Util.fromBase10(11L)).isEqualTo("B"); assertThat(Base62Util.fromBase10(36L)).isEqualTo("a"); assertThat(Base62Util.fromBase10(999L)).isEqualTo("G7"); }