Added SAMODE with associated unit test.