@Test(expected = IndexOutOfBoundsException.class)
public void testWriteOffsetNegative() throws IOException {

  final RollingBuffer b = new RollingBuffer(newChannel(new ByteArrayInputStream(new byte[2])), 1, 2);
  b.write(Channels.newChannel(new ByteArrayOutputStream()), -1, 1);
}