ChunkingSpliterator implements Spliterator<String> { @Override public int characteristics() { return IMMUTABLE | NONNULL | ORDERED | (minChunkSize == maxChunkSize ? SIZED : 0); } ChunkingSpliterator(final String string, final int minChunkSize, final int maxChunkSize); @Override boolean tryAdvance(final Consumer<? super String> action); @Override Spliterator<String> trySplit(); @Override long estimateSize(); @Override int characteristics();  }
@Test void shouldBeSizedWhenMinEqualToMax() { assertTrue((new ChunkingSpliterator("Hello", 5, 5).characteristics() & SIZED) != 0); }
@Test void shouldNotBeSizedWhenMinIsNotEqualToMax() { assertTrue((new ChunkingSpliterator("Hello", 4, 5).characteristics() & SIZED) == 0); }