public static IdGenerator incrementingLongs() {
    AtomicLong longs = new AtomicLong();
    return () -> Long.toString(longs.incrementAndGet());
  }
@Test
  public void incrementing() {
    IdGenerator gen = IdGenerators.incrementingLongs();
    assertThat(gen.getId(), equalTo("1"));
    assertThat(gen.getId(), equalTo("2"));
  }