test copyWithRight
copy with right