@Test
public void testTxnLogProposalIteratorClosure() throws Exception {

    long peerZxid;
    // CommmitedLog is empty, we will use txnlog up to lastProcessZxid
    db = new MockZKDatabase(null) {
        @Override
        public Iterator<Proposal> getProposalsFromTxnLog(long peerZxid,
                long limit) {
            return TxnLogProposalIterator.EMPTY_ITERATOR;
        }
    };
    db.lastProcessedZxid = 7;
    db.txnLog.add(createProposal(2));
    db.txnLog.add(createProposal(3));
    // Peer zxid
    peerZxid = 4;
    assertTrue("Couldn't identify snapshot transfer!",
            learnerHandler.syncFollower(peerZxid, db, leader));
    reset();
}