public void test() {
MailboxFactory mailboxFactory = JAMailboxFactory.newMailboxFactory(1);
try {
JAFuture future = new JAFuture();
Mailbox mailbox = mailboxFactory.createMailbox();
JAFactory factory = new JAFactory();
factory.initialize(mailbox);
factory.registerActorFactory(new TupleJidFactory(
"sst", StringJidFactory.fac, StringJidFactory.fac));
(new JidFactories()).initialize(mailbox, factory);
TupleJidFactory tjf = new TupleJidFactory(
"sst", StringJidFactory.fac, StringJidFactory.fac);
Actor t0 = tjf.newActor(factory.getMailbox(), factory);
IGet iget0 = new IGet(0);
IGet iget1 = new IGet(1);
Actor e0 = iget0.send(future, t0);
assertNull(GetString.req.send(future, e0));
Actor e1 = iget1.send(future, t0);
assertNull(GetString.req.send(future, e1));
(new SetString("Apples")).send(future, e0);
assertEquals("Apples", GetString.req.send(future, e0));
(new SetString("Oranges")).send(future, e1);
assertEquals("Oranges", GetString.req.send(future, e1));
Actor t1 = (new CopyJID()).send(future, t0);
Actor f0 = (new ResolvePathname("0")).send(future, t1);
assertEquals("Apples", GetString.req.send(future, f0));
Actor f1 = (new ResolvePathname("1")).send(future, t1);
assertEquals("Oranges", GetString.req.send(future, f1));
Actor string1 = StringJidFactory.fac.newActor(factory.getMailbox(), factory);
(new SetString("Peaches")).send(future, string1);
byte[] sb = GetSerializedBytes.req.send(future, string1);
(new ISetBytes(1, sb)).send(future, t1);
Actor f1b = (new ResolvePathname("1")).send(future, t1);
assertEquals("Peaches", GetString.req.send(future, f1b));