@Test
public void testReadToEmptyBuffer() throws Exception {

  byte[] inputData = "The quick brown fox jumps over the lazy dog.".getBytes(UTF_8);
  ReadableByteChannel baseChannel = new ByteBufferChannel(inputData);
  RewindableReadableByteChannel rewindableChannel =
      new RewindableReadableByteChannel(baseChannel);
  ByteBuffer buffer = ByteBuffer.allocate(0);
  assertEquals(0, rewindableChannel.read(buffer));
}