*/
public class EncodeDecoderTest extends TestCase {
public void testInvokeEncode() throws Exception {
List<InvokeIMessage> test_messages = new ArrayList<InvokeIMessage>();
test_messages.add( new InvokeIMessage( 1, 2, null, 3, null, null, false ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3, null, null, true ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3, null, null, false ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3, null, null, true ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3,
new Object[] { "foo", "bar" }, null, false ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3,
new Object[] { "foo", "bar" }, null, true ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3,
new Object[] { "foo", "bar" }, null, false ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3,
new Object[] { "foo", "bar" }, null, true ) );
UserContextInfo info = new SimpleUserContextInfo( "bob" );
test_messages.add( new InvokeIMessage( 1, 2, null, 3, null, info, false ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3, null, info, true ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3, null, info, false ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3, null, info, true ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3,
new Object[] { "foo", "bar" }, info, false ) );
test_messages.add( new InvokeIMessage( 1, 2, null, 3,
new Object[] { "foo", "bar" }, info, true ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3,
new Object[] { "foo", "bar" }, info, false ) );
test_messages.add( new InvokeIMessage( 1, 2, "Name", 3,
new Object[] { "foo", "bar" }, info, true ) );
IoBuffer buffer = IoBuffer.allocate( 1024 * 100 );
int index = -1;