ReadableByteChannel readableByteChannel = createReadableByteChannel(closed, ar);
TupleSupport ts = new TupleSupport();
XLogReader xlogReader = new XLogReader(readableByteChannel);
for (int i = 0; i < 10; i++) {
Tuple tuple = ts.create(i, Long.parseLong("98765432" + i), "Hello world " + i + "!");
XLogEntry entry = xlogReader.nextEntry();
Assert.assertTrue(Arrays.equals(tuple.pack(), entry.tuple.pack()));
}
xlogReader.close();
Assert.assertTrue(closed.get());