assertEquals( ( byte ) 0xFF, result[0] );
assertEquals( ( byte ) 0xFF, result[1] );
assertEquals( ( byte ) 0xFF, result[2] );
assertEquals( ( byte ) 0xFF, result[3] );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
// ------------------------------------------------------------------
value = "";
result = serializer.serialize( value );
assertEquals( 4, result.length );
assertEquals( ( byte ) 0x00, result[0] );
assertEquals( ( byte ) 0x00, result[1] );
assertEquals( ( byte ) 0x00, result[2] );
assertEquals( ( byte ) 0x00, result[3] );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
// ------------------------------------------------------------------
value = "test";
result = serializer.serialize( value );
assertEquals( 8, result.length );
assertEquals( ( byte ) 0x00, result[0] );
assertEquals( ( byte ) 0x00, result[1] );
assertEquals( ( byte ) 0x00, result[2] );
assertEquals( ( byte ) 0x04, result[3] );
assertEquals( 't', result[4] );
assertEquals( 'e', result[5] );
assertEquals( 's', result[6] );
assertEquals( 't', result[7] );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
// ------------------------------------------------------------------
value = "L\u00E9charny";
result = serializer.serialize( value );
assertEquals( 13, result.length );
assertEquals( ( byte ) 0x00, result[0] );
assertEquals( ( byte ) 0x00, result[1] );
assertEquals( ( byte ) 0x00, result[2] );
assertEquals( ( byte ) 0x09, result[3] );
assertEquals( 'L', result[4] );
assertEquals( ( byte ) 0xC3, result[5] );
assertEquals( ( byte ) 0xA9, result[6] );
assertEquals( 'c', result[7] );
assertEquals( 'h', result[8] );
assertEquals( 'a', result[9] );
assertEquals( 'r', result[10] );
assertEquals( 'n', result[11] );
assertEquals( 'y', result[12] );
assertEquals( value, serializer.deserialize( new BufferHandler( result ) ) );
}