### Question:
FlexBuffer { final public FlexBuffer skip( int len, boolean put ) throws IOException { if (len < 0) throw new IllegalArgumentException( "len < 0" ); if (len == 0) return this; if (put) { ensureLength( index+len ); index += len; fixLength(); return this; } checkAvail( len ); index += len; return this; } FlexBuffer();  FlexBuffer( byte[] buffer );  FlexBuffer( byte[] buffer, int length );  FlexBuffer( byte[] buffer, int index, int length ); final byte[] getBuf(); final int length(); final FlexBuffer setLength( int length ); final int index(); final FlexBuffer setIndex( int index ); final int avail(); final FlexBuffer reset(); final FlexBuffer compact(); final int get(); final int get( byte[] buf ); final int get( byte[] buf, int off, int len ); final byte getByte(); final short getShort(); final int getInt(); final long getLong(); final float getFloat(); final double getDouble(); final void getFully( byte[] b ); final FlexBuffer put( int b ); final FlexBuffer put( byte[] buf ); final FlexBuffer put( byte[] buf, int off, int len ); final FlexBuffer put( FlexBuffer buf ); final FlexBuffer put( FlexBuffer buf, int len ); final void putByte( byte value ); final void putShort( short value ); final void putInt( int value ); final void putLong( long value ); final void putFloat( float value ); final void putDouble( double value ); final FlexBuffer skip( int len, boolean put ); final byte[] getAvailBytes();  }### Answer:
@Test( expected = IllegalArgumentException.class ) public void skip1() throws Exception { FlexBuffer buf = new FlexBuffer(); buf.skip(-1, false); }
@Test( expected = EOFException.class ) public void skip2() throws Exception { FlexBuffer buf = new FlexBuffer( new byte[] { 1, 2 } ); buf.skip(3, false); }
@Test( expected = IOException.class ) public void skip8() throws Exception { FlexBuffer buf = new FlexBuffer( new byte[] { 1, 2 } ); int max = 4*1024*1024; buf.skip(max+1, true); }