logStream.truncateBefore(new LogPosition(truncate));
}
@Test(expected = NoSuchElementException.class)
public void testIteratorUsage() throws Exception {
Position beginning = makePosition(1);
Position middle = makePosition(2);
Position end = expectWrite(DUMMY_CONTENT, 3);
expectDiscoverEntryRange(beginning, end);
// SKipped entries.
expectRead(beginning).andReturn(ImmutableList.<Log.Entry>of());
expectRead(middle).andReturn(ImmutableList.<Log.Entry>of());
expectRead(end).andReturn(ImmutableList.<Log.Entry>of());