use of com.annimon.stream.LongStream in project Lightweight-Stream-API by aNNiMON.
the class GenerateTest method testStreamGenerate.
@Test
public void testStreamGenerate() {
LongStream stream = LongStream.generate(new LongSupplier() {
@Override
public long getAsLong() {
return 1234L;
}
});
assertThat(stream.limit(3), elements(arrayContaining(1234L, 1234L, 1234L)));
}
Aggregations