// 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 org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static io.generators.core.Generators.positiveInts;
import static java.util.Arrays.asList;
import static org.mockito.Mockito.verify;
package io.generators.core;



@RunWith(MockitoJUnitRunner.class)
public class BroadcastingGeneratorTest {

    public static final Generator<Integer> NULL_DELEGATE = null;
    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Mock
    private Consumer<Integer> firstConsumer;
    @Mock
    private Consumer<Integer> secondConsumer;


    @Test
    public void shouldPublishGeneratedValuesToConsumers() {
        //Given
// 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/BroadcastingGeneratorTest.java
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import static io.generators.core.Generators.positiveInts;
import static java.util.Arrays.asList;
import static org.mockito.Mockito.verify;

package io.generators.core;



@RunWith(MockitoJUnitRunner.class)
public class BroadcastingGeneratorTest {

    public static final Generator<Integer> NULL_DELEGATE = null;
    @Rule
    public ExpectedException expectedException = ExpectedException.none();

    @Mock
    private Consumer<Integer> firstConsumer;
    @Mock
    private Consumer<Integer> secondConsumer;


    @Test
    public void shouldPublishGeneratedValuesToConsumers() {
        //Given
        Generator<Integer> generator = new BroadcastingGenerator<>(Generators.positiveInts, firstConsumer, secondConsumer);