Add unit test for add_mod_q