Devise, document and implement tests for powerMod() function