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