@Override
  public InMemoryReaderIterator iterator() throws IOException {
    return new InMemoryReaderIterator();
  }
@Test
  public void testParallelism() throws Exception {
    List<Integer> elements = Arrays.asList(33, 44, 55, 66, 77, 88);

    Coder<Integer> coder = BigEndianIntegerCoder.of();
    InMemoryReader<Integer> inMemoryReader =
        new InMemoryReader<>(encodedElements(elements, coder), 1, 4, coder);
    int count = 0;
    try (InMemoryReader<Integer>.InMemoryReaderIterator iterator = inMemoryReader.iterator()) {
      for (boolean more = iterator.start(); more; more = iterator.advance()) {
        assertTrue(iterator.getRemainingParallelism() >= 1);
        assertEquals(3 - count, iterator.getRemainingParallelism(), 0 /*tolerance*/);
        count++;
      }
    }
  }