@Override
    public void write(int b) {
        ensureAvailable(1);
        buffer[pos++] = (byte) (b);
    }
@Test(expected = IndexOutOfBoundsException.class)
    public void testWriteForBOffLen_negativeOff() {
        out.write(TEST_DATA, -1, 3);
    }