0x01, 0x01, ( byte ) 0xFF // deleteOldRdn
} );
bb.flip();
SyncModifyDnDecorator decorator = new SyncModifyDnDecorator( codec );
SyncModifyDn syncmodDnControl = (SyncModifyDn)decorator.decode( bb.array() );
assertEquals( "uid=jim", syncmodDnControl.getEntryDn() );
assertEquals( "ou=dc", syncmodDnControl.getNewSuperiorDn() );
assertEquals( "uid=j", syncmodDnControl.getNewRdn() );
assertTrue( syncmodDnControl.isDeleteOldRdn() );
// Check the encoding
try
{
ByteBuffer encoded = ((SyncModifyDnDecorator)syncmodDnControl).encode( ByteBuffer.allocate( ((SyncModifyDnDecorator)syncmodDnControl).computeLength() ) );