// no recovery opened ledger 's last confirmed entry id is less than written
// and it just can read until (i-1)
int toRead = i - 1;
Enumeration<LedgerEntry> readEntry = lhOpen.readEntries(toRead, toRead);
assertTrue("Enumeration of ledger entries has no element", readEntry.hasMoreElements() == true);
LedgerEntry e = readEntry.nextElement();
assertEquals(toRead, e.getEntryId());
Assert.assertArrayEquals(entries.get(toRead), e.getEntry());
// should not written to a read only ledger
try {
lhOpen.addEntry(entry.array());
fail("Should have thrown an exception here");
} catch (BKException.BKIllegalOpException bkioe) {