public void testParseMessage () {
try {
StringMsgParser smp = new StringMsgParser();
SIPMessage message = smp.parseSIPMessage(messageToParse.getBytes("UTF-8"), true, false, null);
System.out.println("Message = " + message);
byte[] bytes = message.encodeAsBytes("UDP");
smp = new StringMsgParser();
message = smp.parseSIPMessage(bytes, true, false, null);
System.out.println("Message = " + message);
char[] mybytes = new char[2];
byte[] sipMessageBytes = new byte[binaryMessage.length()];
for ( int i = 0; i < binaryMessage.length(); i += 2) {
mybytes[0] = binaryMessage.charAt(i);
mybytes[1] = binaryMessage.charAt(i+1);
String byteString = new String(mybytes);
int val = Integer.parseInt(byteString,16);
sipMessageBytes[i/2] = (byte)val;
}
smp = new StringMsgParser();
SIPMessage reparsed = smp.parseSIPMessage(sipMessageBytes, true, false, null);
System.out.println("Reparsed = " + reparsed);
bytes = message.encodeAsBytes("UDP");
smp = new StringMsgParser();
reparsed = smp.parseSIPMessage(bytes, true, false, null);
System.out.println("Reparsed = " + reparsed);
} catch (Exception ex) {