Assignment operator and tests