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

  Writer writer = new FastStringWriter();
  writer.write(new char[]{'h', 'e', 'l', 'l', 'o' }, -1, 3);
  IOUtils.closeQuietly(writer);
}