MessageUtils.makeMessageBuffer(999, new PutCommand(this.topic, partition, "hello world".getBytes(),
null, 0, opaque));
final MessageStore store = this.mocksControl.createMock(MessageStore.class);
EasyMock.expect(this.storeManager.getMessageStore(this.topic, partition)).andReturn(store);
final MessageSet set = this.mocksControl.createMock(MessageSet.class);
EasyMock.expect(store.slice(offset, maxSize)).andReturn(set);
final GetCommand request = new GetCommand(this.topic, this.group, partition, offset, maxSize, opaque);
set.read((ByteBuffer) EasyMock.anyObject());
EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() {
@Override