@Test public void generateFanIn() throws Exception {

  assertThat(MoreStreams.generate(100, i -> IntStream.rangeClosed(1, i / 10).boxed())
          .collect(toList()))
      .containsExactly(100, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1);
}