0x04, 0x03, 'a', 'b', 'c', // cookie syncCookie OPTIONAL,
0x01, 0x01, 0x00 // reloadHint BOOLEAN DEFAULT FALSE
} );
bb.flip();
SyncRequestValue decorator = new SyncRequestValueDecorator( codec );
SyncRequestValue syncRequestValue = (SyncRequestValue)((SyncRequestValueDecorator)decorator).decode( bb.array() );
assertEquals( SynchronizationModeEnum.REFRESH_ONLY, syncRequestValue.getMode() );
assertEquals( "abc", Strings.utf8ToString(syncRequestValue.getCookie()) );
assertEquals( false, syncRequestValue.isReloadHint() );
// Check the encoding
try
{
bb = ByteBuffer.allocate( 0x0A );