Add test for RationalFunction class