StandardOpenOption.WRITE,
StandardOpenOption.CREATE);
RootJid rj = new RootJid();
rj.initialize(mailbox, factory);
Block block = new LTA32Block();
block.setRootJid(rj);
long timestamp = System.currentTimeMillis();
block.setTimestamp(timestamp);
(new ForcedWriteRootJid(block)).send(future, jFile);
assertEquals(20L, block.getCurrentPosition());
Block block2 = new LTA32Block();
(new ReadRootJid(block2)).send(future, jFile);
RootJid rj2 = block2.getRootJid(mailbox, factory);
assertNotNull(rj2);
long timestamp2 = block2.getTimestamp();
assertEquals(timestamp, timestamp2);
(new ReadRootJid(block2)).send(future, jFile);
rj2 = block2.getRootJid(mailbox, factory);
assertNull(rj2);
jFile.fileChannel.close();
mailboxFactory.close();
}