ParticipantIDParser { protected static long getNumericType(String raw) { if (raw.contains(RemoteParticipant.RemoteParticipant_TYPE_CALL)) { return TYPE_CALL; } else if (raw.contains(RemoteParticipant.RemoteParticipant_TYPE_CONFERENCE)) { return TYPE_CONFERENCE; } else if (raw.contains(RemoteParticipant.RemoteParticipant_TYPE_DIALOG)) { return TYPE_DIALOG; } return 0; }  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 testEncodeType() { assertEquals(ParticipantIDParser.getNumericType( RemoteParticipant.RemoteParticipant_TYPE_CALL), ParticipantIDParser.TYPE_CALL); assertEquals(ParticipantIDParser.getNumericType( RemoteParticipant.RemoteParticipant_TYPE_CONFERENCE), ParticipantIDParser.TYPE_CONFERENCE); assertEquals(ParticipantIDParser.getNumericType( RemoteParticipant.RemoteParticipant_TYPE_DIALOG), ParticipantIDParser.TYPE_DIALOG); }