@Test public void increasesByOne() { for (int i = 1; i < 100; i++) { assertEquals(i, sequentialMessageIdGenerator.nextId()); } }
@Override public int nextId() { return atomicInteger.incrementAndGet(); }
SequentialMessageIdGenerator implements MessageIdGenerator { @Override public int nextId() { return atomicInteger.incrementAndGet(); } }
SequentialMessageIdGenerator implements MessageIdGenerator { @Override public int nextId() { return atomicInteger.incrementAndGet(); }  }
SequentialMessageIdGenerator implements MessageIdGenerator { @Override public int nextId() { return atomicInteger.incrementAndGet(); }  @Override int nextId(); }
SequentialMessageIdGenerator implements MessageIdGenerator { @Override public int nextId() { return atomicInteger.incrementAndGet(); }  @Override int nextId();  }