public void onlyOneNonFullBlock() throws IOException
{
byte[] bytes = new byte[255];
ChannelBuffer wrappedBuffer = ChannelBuffers.wrappedBuffer( bytes );
wrappedBuffer.resetWriterIndex();
BlockLogBuffer buffer = new BlockLogBuffer( wrappedBuffer );
byte byteValue = 5;
int intValue = 1234;
long longValue = 574853;
float floatValue = 304985.5f;
double doubleValue = 48493.22d;
final byte[] bytesValue = new byte[] { 1, 5, 2, 6, 3 };
final char[] charsValue = "This is chars".toCharArray();
buffer.put( byteValue );
buffer.putInt( intValue );
buffer.putLong( longValue );
buffer.putFloat( floatValue );
buffer.putDouble( doubleValue );
buffer.put( bytesValue );
buffer.put( charsValue );
buffer.done();
ByteBuffer verificationBuffer = ByteBuffer.wrap( bytes );
assertEquals( 56, verificationBuffer.get() );
assertEquals( byteValue, verificationBuffer.get() );
assertEquals( intValue, verificationBuffer.getInt() );