Add test for sorting in the AbstractJoinpoint