// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static <T> Generator<T> ofInstance(T instance) {
//     return new GeneratorOfInstance<>(instance);
// }
// 
// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static Generator<Integer> positiveInts(int from, int to) {
//     return new RandomPositiveIntegerGenerator(from, to);
// }


import com.google.common.base.Function;
import com.google.common.base.Predicate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.List;
import java.util.Set;
import static com.google.common.collect.Sets.newHashSet;
import static io.generators.core.Generators.ofInstance;
import static io.generators.core.Generators.positiveInts;
import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.verify;

    @Test
    public void shouldCreateFluentUniqueGenerator() {
        //Given
        Generator<Integer> generator = FluentGenerator.from(positiveInts(1, 3)).unique();

        //When
        List<Integer> integers = asList(generator.next(), generator.next());

        //Then
        assertThat(integers, containsInAnyOrder(1, 2));
    }

    @Test
    public void shouldCreateFluentUniqueOfTypeGenerator() {
        //Given
        FluentGenerator<WholeAmount> generator = FluentGenerator.from(positiveInts)
                .unique()
                .ofType(WholeAmount.class);

        //When
        WholeAmount wholeAmount = generator.next();

        //Then
        assertThat(wholeAmount, notNullValue());
    }

    @Test
    public void shouldCreateFluentUniqueOfTypeIterableGenerator() {
        //Given
// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static <T> Generator<T> ofInstance(T instance) {
//     return new GeneratorOfInstance<>(instance);
// }
// 
// Path: generators-core/src/main/java/io/generators/core/Generators.java
// public static Generator<Integer> positiveInts(int from, int to) {
//     return new RandomPositiveIntegerGenerator(from, to);
// }


// Path: generators-core/src/test/java/io/generators/core/FluentGeneratorTest.java
import com.google.common.base.Function;
import com.google.common.base.Predicate;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import java.util.List;
import java.util.Set;
import static com.google.common.collect.Sets.newHashSet;
import static io.generators.core.Generators.ofInstance;
import static io.generators.core.Generators.positiveInts;
import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;
import static org.mockito.Mockito.verify;


    @Test
    public void shouldCreateFluentUniqueGenerator() {
        //Given
        Generator<Integer> generator = FluentGenerator.from(positiveInts(1, 3)).unique();

        //When
        List<Integer> integers = asList(generator.next(), generator.next());

        //Then
        assertThat(integers, containsInAnyOrder(1, 2));
    }

    @Test
    public void shouldCreateFluentUniqueOfTypeGenerator() {
        //Given
        FluentGenerator<WholeAmount> generator = FluentGenerator.from(positiveInts)
                .unique()
                .ofType(WholeAmount.class);

        //When
        WholeAmount wholeAmount = generator.next();

        //Then
        assertThat(wholeAmount, notNullValue());
    }

    @Test
    public void shouldCreateFluentUniqueOfTypeIterableGenerator() {
        //Given
        Iterable<WholeAmount> amounts = FluentGenerator.from(positiveInts)