journal.write(new String("DATA" + i).getBytes("UTF-8"), writeType);
}
// Replay the journal forward by redoing:
int i = 0;
for (Location location : journal.redo()) {
byte[] record = journal.read(location, Journal.ReadType.ASYNC);
assertEquals("DATA" + i++, new String(record, "UTF-8"));
}
// Replay the journal backward by undoing: