@Test
public void generator1() {

	final Spliterator<Integer> spliterator =
		new GeneratorSpliterator<>(
			i -> {
				final int s = i == null ? 0 : i;
				return Stream.of(s + 1, s + 2, s + 3).spliterator();
			}
		);
	final int[] array = StreamSupport.stream(spliterator, false)
		.limit(10)
		.mapToInt(Integer::intValue)
		.toArray();
	Assert.assertEquals(array, new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10});
}