@Override
  public String getNext() {
    if (alreadyUsed) {
      throw new KsqlServerException("QueryIdGenerator has not been updated with new offset");
    }

    alreadyUsed = true;
    return String.valueOf(nextId);
  }
@Test
  public void shouldReturnZeroIdForFirstQuery() {
    assertThat(generator.getNext(), is("0"));
  }