### Question:
FlexBuffer { final private void checkBuf( byte[] buf, int off, int len ) { if (buf == null) throw new NullPointerException( "buf == null" ); if (off < 0 || off > buf.length) throw new IllegalArgumentException( "off < 0 || off > buf.length" ); if (len < 0) throw new IllegalArgumentException( "len < 0" ); if (off+len > buf.length) throw new IllegalArgumentException( "off+len > buf.length" ); } 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 public void initial1() throws Exception { FlexBuffer buf = new FlexBuffer(); checkBuf( buf, 0, 0, 0 ); }
@Test public void initial2() throws Exception { FlexBuffer buf = new FlexBuffer( new byte[5] ); checkBuf( buf, 5, 0, 5 ); }
@Test public void initial3() throws Exception { FlexBuffer buf = new FlexBuffer( new byte[5], 2 ); checkBuf( buf, 2, 0, 2 ); }
@Test public void initial4() throws Exception { FlexBuffer buf = new FlexBuffer( new byte[5], 1, 3 ); checkBuf( buf, 4, 1, 3 ); }