Convert modular exponentiation tests to new framework