@Test public void withSideEffect() {

  List<Integer> list = new ArrayList<>();
  Stream<Integer> stream = MoreStreams.withSideEffect(Stream.of(1, 3, 5), list::add);
  assertThat(stream.isParallel()).isFalse();
  assertThat(list).isEmpty();
  assertThat(stream.skip(1).limit(1)).containsExactly(3);
  assertThat(list).containsExactly(1, 3).inOrder();;
}