final Broker broker = new Broker(1, url);
final long delay = 0;
final TopicPartitionRegInfo topicPartitionRegInfo = new TopicPartitionRegInfo(topic, partition, offset);
EasyMock.expect(
this.remotingClient.invokeToGroup(url,
new OffsetCommand(topic, this.consumerConfig.getGroup(), partition.getPartition(), offset,
Integer.MIN_VALUE), this.consumerConfig.getFetchTimeoutInMills(), TimeUnit.MILLISECONDS))
.andReturn(new BooleanCommand(HttpStatus.Success, String.valueOf(offset), Integer.MIN_VALUE));
this.mocksControl.replay();
OpaqueGenerator.resetOpaque();
assertEquals(offset, this.consumer.offset(new FetchRequest(broker, delay, topicPartitionRegInfo, maxSize)));