public class ListTest extends TestCase {
public void test() {
MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1);
try {
JidFactories factory = new JidFactories();
factory.initialize(mailboxFactory.createMailbox());
JAFuture future = new JAFuture();
Actor l0 = (new ListJidFactory(JidFactories.STRING_LIST_JID_TYPE, StringJidFactory.fac)).
newActor(factory.getMailbox(), factory);
int l0sl = GetSerializedLength.req.send(future, l0);
assertEquals(8, l0sl);
Actor l1 = (new CopyJID()).send(future, l0);
int l1sl = GetSerializedLength.req.send(future, l1);
assertEquals(8, l1sl);
(new IAdd(0)).send(future, l1);
l1sl = GetSerializedLength.req.send(future, l1);
assertEquals(12, l1sl);
Actor l2 = (new CopyJID()).send(future, l1);
int l2sl = GetSerializedLength.req.send(future, l2);
assertEquals(12, l2sl);
Actor s0 = StringJidFactory.fac.newActor(factory.getMailbox(), factory);
(new SetString("Hi")).send(future, s0);
int s0sl = GetSerializedLength.req.send(future, s0);
assertEquals(8, s0sl);
byte[] s0bs = GetSerializedBytes.req.send(future, s0);
assertEquals(8, s0bs.length);