@Test public void testNext() throws Exception { LongIDGenerator generator = new LongIDGenerator(); assertEquals(Long.valueOf(1l), generator.next()); assertEquals(Long.valueOf(2l), generator.next()); assertEquals(Long.valueOf(3l), generator.next()); }
public Long next() { return ++id; }
LongIDGenerator implements NextGenerator<Long> { public Long next() { return ++id; } }
LongIDGenerator implements NextGenerator<Long> { public Long next() { return ++id; }  }
LongIDGenerator implements NextGenerator<Long> { public Long next() { return ++id; }  Long next(); }
LongIDGenerator implements NextGenerator<Long> { public Long next() { return ++id; }  Long next();  }