ParticipantIDParser { public static String encode(String raw) { String[] parts = parseId(raw); return shorten(toBigInteger(parts[0])) + "-" + shorten(toBigInteger(parts[1], parts[2])) + "-" + shorten(new BigInteger(parts[3])); }  static String encode(String raw); static String decode(String encoded); static String[] parseId(String raw); static String getIpAddress(String encoded); static String[] parseEncodedId(String encodedId); static boolean isCall(RemoteParticipant participant); static boolean isMixer(RemoteParticipant participant); static void main(String[] args); static Pattern pattern; }
@Test public void testEncode() { String raw = "moho: assertEquals(raw, ParticipantIDParser.decode(ParticipantIDParser.encode(raw))); raw = "moho: assertEquals(raw, ParticipantIDParser.decode(ParticipantIDParser.encode(raw))); raw = "moho: assertEquals(raw, ParticipantIDParser.decode(ParticipantIDParser.encode(raw))); }