Sequence { public Sequence(int start) { value = start; } Sequence(int start); synchronized int nextValue(); synchronized int currentValue();  }
@Test(groups="checkintest") public void testSequence() { Sequence sequence = new Sequence(1); for (int i = 1; i < 100; i++) { assertEquals(sequence.nextValue(), i); } }