connect.clientId(new UTF8Buffer("test"));
connect.userName(new UTF8Buffer("user"));
connect.password(new UTF8Buffer("pass"));
DataByteArrayOutputStream output = new DataByteArrayOutputStream();
wireFormat.marshal(connect.encode(), output);
wireFormat.marshal(connect.encode(), output);
Buffer marshalled = output.toBuffer();
DataByteArrayInputStream input = new DataByteArrayInputStream(marshalled);
codec.parse(input, marshalled.length());