@Test
public void testIteratorToEnd() throws Exception {
EasyMock
.expect(
this.consumer.get(this.topic, new Partition("0-0"), 0L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(new MessageIterator(this.topic, this.createMessageBuffer()))
.once();
EasyMock.expect(
this.consumer.get(this.topic, new Partition("0-0"), 25L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(null);
EasyMock
.expect(
this.consumer.get(this.topic, new Partition("0-1"), 0L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(new MessageIterator(this.topic, this.createMessageBuffer()))
.once();
EasyMock
.expect(
this.consumer.get(this.topic, new Partition("0-1"), 25L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(null).once();
EasyMock
.expect(
this.consumer.get(this.topic, new Partition("0-2"), 0L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(new MessageIterator(this.topic, this.createMessageBuffer()))
.once();
EasyMock
.expect(
this.consumer.get(this.topic, new Partition("0-2"), 25L, this.maxSize, this.timeoutInMills,
TimeUnit.MILLISECONDS)).andReturn(null).once();