@Test public void testSequence() { SequenceIdGenerator generator = new SequenceIdGenerator(); List<String> ids = Arrays.asList(generator.getId(), generator.getId(), generator.getId()); assertThat(ids, is(Arrays.asList("1", "2", "3"))); }
public String getId() { return String.valueOf(sequence.getAndIncrement()); }
SequenceIdGenerator implements IdGenerator { public String getId() { return String.valueOf(sequence.getAndIncrement()); } }
SequenceIdGenerator implements IdGenerator { public String getId() { return String.valueOf(sequence.getAndIncrement()); }  }
SequenceIdGenerator implements IdGenerator { public String getId() { return String.valueOf(sequence.getAndIncrement()); }  String getId(); }
SequenceIdGenerator implements IdGenerator { public String getId() { return String.valueOf(sequence.getAndIncrement()); }  String getId();  }