### Question:
CyclicGenerator implements Generator<T> { @Override public T next() { return iterator.next(); } @SafeVarargs  CyclicGenerator(@Nonnull T first, @Nonnull T... rest); @Override T next();  }### Answer:
@Test public void shouldCycle() throws Exception { List<Integer> generatedValues = newArrayList(); for (int i = 0; i < 10; i++) { generatedValues.add(generator.next()); } assertThat(generatedValues, contains(3, 4, 5, 3, 4, 5, 3, 4, 5, 3)); }