enc/dec tests