* Contribution by Nicolas Labrot
*/
@Test
public void testParallelWithJava8StreamsInput() throws InterruptedException {
env.addDispatcherFactory("test-p",
Environment.createDispatcherFactory("test-p", 2, 2048, null, ProducerType.MULTI, new BlockingWaitStrategy()));
int max = ThreadLocalRandom.current().nextInt(100, 300);
CountDownLatch countDownLatch = new CountDownLatch(max + 1);
Stream<Integer> worker = Streams.range(0, max).dispatchOn(env);