public void testEncodeSyncRequestValue() throws Exception
{
SyncRequestValue syncRequestValue = new SyncRequestValueImpl();
syncRequestValue.setMode( SynchronizationModeEnum.REFRESH_ONLY );
SyncRequestValueDecorator decorator = new SyncRequestValueDecorator( codec, syncRequestValue );
ByteBuffer buffer = decorator.encode( ByteBuffer.allocate( decorator.computeLength() ) );
String expected = Strings.dumpBytes( new byte[]{ 0x30, 0x03, 0x0A, 0x01, 0x01 } );
assertEquals( expected, Strings.dumpBytes( buffer.array() ) );
}