@Test public void streamFromQueue() { assertThat( LazyReact.sequentialBuilder() .reactInfinitely(() -> "100") .limit(100) .withQueueFactory(QueueFactories.boundedQueue(10)) .toQueue() .stream() .collect(Collectors.toList()) .size(), equalTo(100)); }
@Test public void reactInfinitely() { assertThat( LazyReact.sequentialBuilder().reactInfinitely(() -> "100").limit(100).toList().size(), equalTo(100)); }