} );
bb.flip();
SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec );
SyncRequestValue syncRequestValue = (SyncRequestValue)decorator.decode( bb.array() );
assertEquals( SynchronizationModeEnum.REFRESH_AND_PERSIST, syncRequestValue.getMode() );
assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
assertEquals( false, syncRequestValue.isReloadHint() );
// Check the encoding
try
{
ByteBuffer buffer = ((SyncRequestValueDecorator)syncRequestValue).encode( ByteBuffer.allocate( ((SyncRequestValueDecorator)syncRequestValue).computeLength() ) );