@Test public void each_subsequent_RunId_is_incremented_by_one() { RunId id0 = sequence.nextRunId(); RunId id1 = sequence.nextRunId(); RunId id2 = sequence.nextRunId(); assertThat(id1.toInt(), is(id0.toInt() + 1)); assertThat(id2.toInt(), is(id1.toInt() + 1)); }
public RunId nextRunId() { int currentId = nextId.getAndIncrement(); return new RunId(currentId); }
RunIdSequence { public RunId nextRunId() { int currentId = nextId.getAndIncrement(); return new RunId(currentId); } }
RunIdSequence { public RunId nextRunId() { int currentId = nextId.getAndIncrement(); return new RunId(currentId); }  }
RunIdSequence { public RunId nextRunId() { int currentId = nextId.getAndIncrement(); return new RunId(currentId); }  RunId nextRunId(); }
RunIdSequence { public RunId nextRunId() { int currentId = nextId.getAndIncrement(); return new RunId(currentId); }  RunId nextRunId();  }