@Override
  public CheckpointMarkImpl getCheckpointMark() {
    // By checkpointing, the runtime indicates it has finished processing all data it has already
    // pulled. This means we can ask Pub/Sub Lite to refill our in-memory buffer without causing
    // unbounded memory usage.
    subscriber.rebuffer();
    return new CheckpointMarkImpl(fetchOffset, committer);
  }
@Test
  public void getCheckpointMark() throws Exception {
    startSubscriber();
    advancePastMessage(2);
    CheckpointMarkImpl mark = reader.getCheckpointMark();
    verify(subscriber).rebuffer();
    assertEquals(3, mark.offset.value());
  }