SingletonPrimitiveSpliteratorOfLong implements Spliterator.OfLong { @Override public void forEachRemaining(LongConsumer consumer) { tryAdvance(consumer); } SingletonPrimitiveSpliteratorOfLong(long element); @Override OfLong trySplit(); @Override boolean tryAdvance(LongConsumer consumer); @Override void forEachRemaining(LongConsumer consumer); @Override long estimateSize(); @Override int characteristics();  }
@Test void forEachRemainingIntConsumer() { instance.forEachRemaining((LongConsumer) i -> cnt.incrementAndGet()); assertEquals(1, cnt.get()); }
@Test void forEachRemainingConsumer() { instance.forEachRemaining((Consumer<Long>) i -> cnt.incrementAndGet()); assertEquals(1, cnt.get()); }