Added tests for sort_fractions