Added tests from manual for residue rings.