  @Test
  public void testIncrement() {

    final long initialValue = 1000;
    final long serviceInitialValue = -1;
    final long maxValue = 10000000;

    IdGeneratorService service = new LocalIdService(serviceInitialValue);
    SegmentedIdGenerator id = new SegmentedIdGenerator(initialValue, service);
    for (long i = initialValue + 1; i <= maxValue; i++) {
      assertThat(id.nextValue(), is(i));
    }
  }