Add tests for math.egi

Add tests for math.egi.