// Path: generators-core/src/main/java/io/generators/core/CyclicGenerator.java
// public class CyclicGenerator<T> implements Generator<T> {
//     private final Iterator<T> iterator;
// 
//     /**
//      * Creates generator that cycles over provided {@code first} and {@code rest} elements
//      *
//      * @param first first element in the set of elements to cycle over
//      * @param rest  rest of the elements
//      * @throws java.lang.NullPointerException when first or one of the rest elements is null
//      */
//     @SafeVarargs
//     public CyclicGenerator(@Nonnull T first, @Nonnull T... rest) {
//         ImmutableList<T> values = ImmutableList.<T>builder()
//                 .add(first)
//                 .add(rest)
//                 .build();
// 
//         this.iterator = Iterators.cycle(values);
//     }
// 
//     @Override
//     public T next() {
//         return iterator.next();
//     }
// }
// 
// Path: generators-core/src/main/java/io/generators/core/Generator.java
// public interface Generator<T> {
// 
//     /**
//      * Returns generated &lt;T&gt;
//      *
//      * @return generated <T>
//      */
//     T next();
// }


import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import io.generators.core.CyclicGenerator;
import io.generators.core.Generator;
import org.junit.Test;
package io.generators.core.network;



/**
 * @author Saket
 */
public class IPv6GeneratorTest {

    @Test
    public void shouldReturnAnIPAddressWithValidOctets() {
        Generator<String> generator = new IPv6Generator();

        for (int i = 0; i < 100; i++) {
            String ipAddress = generator.next();
            assertThatHasValidHexDigitsInGroups(ipAddress);
        }
    }

    @Test
    public void shouldReturnAnIPAddressUsingTheDelegateOctetGenerator() {
// Path: generators-core/src/main/java/io/generators/core/CyclicGenerator.java
// public class CyclicGenerator<T> implements Generator<T> {
//     private final Iterator<T> iterator;
// 
//     /**
//      * Creates generator that cycles over provided {@code first} and {@code rest} elements
//      *
//      * @param first first element in the set of elements to cycle over
//      * @param rest  rest of the elements
//      * @throws java.lang.NullPointerException when first or one of the rest elements is null
//      */
//     @SafeVarargs
//     public CyclicGenerator(@Nonnull T first, @Nonnull T... rest) {
//         ImmutableList<T> values = ImmutableList.<T>builder()
//                 .add(first)
//                 .add(rest)
//                 .build();
// 
//         this.iterator = Iterators.cycle(values);
//     }
// 
//     @Override
//     public T next() {
//         return iterator.next();
//     }
// }
// 
// Path: generators-core/src/main/java/io/generators/core/Generator.java
// public interface Generator<T> {
// 
//     /**
//      * Returns generated &lt;T&gt;
//      *
//      * @return generated <T>
//      */
//     T next();
// }


// Path: generators-core/src/test/java/io/generators/core/network/IPv6GeneratorTest.java
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import io.generators.core.CyclicGenerator;
import io.generators.core.Generator;
import org.junit.Test;

package io.generators.core.network;



/**
 * @author Saket
 */
public class IPv6GeneratorTest {

    @Test
    public void shouldReturnAnIPAddressWithValidOctets() {
        Generator<String> generator = new IPv6Generator();

        for (int i = 0; i < 100; i++) {
            String ipAddress = generator.next();
            assertThatHasValidHexDigitsInGroups(ipAddress);
        }
    }

    @Test
    public void shouldReturnAnIPAddressUsingTheDelegateOctetGenerator() {
        Generator<String> generator = new IPv6Generator(new CyclicGenerator<>(10));