@Test
public void testSmallChunksNoDataEveryOtherRead() throws Exception {

  byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8);
  ReadableByteChannel baseChannel =
      new ByteBufferChannel(inputData, /*maxChunkSize=*/ 10, /*noDataEveryOtherRead=*/ true);
  RewindableReadableByteChannel rewindableChannel =
      new RewindableReadableByteChannel(baseChannel);
  ByteBuffer buffer1 = ByteBuffer.allocate(15);
  assertEquals(0, rewindableChannel.read(buffer1));
  assertEquals(10, rewindableChannel.read(buffer1));
  assertEquals(0, rewindableChannel.read(buffer1));
  assertEquals(5, rewindableChannel.read(buffer1));
  assertArrayEquals(buffer1.array(), Arrays.copyOf(inputData, 15));
}